I am relatively new to Android development, and I’m using Android Studio for development. I am trying to work with the camera for my app, and I’m trying to follow the instructions here https://developer.android.com/training/camera/photobasics. It says to use the FileProvider class, but when I try to import it, I get the error “error: package androidx.core.content does not exist” I’ve already
Tag: android-studio
How to set filter property in ImageView Android studio
I have a yellow sparkline png and I would like to change the filter by adding some css. Colors will change according to positive or negative number. So, if the number is negative, the line should be: CSS If positive: ImageView: MainActivity.Java EDIT: What I have: What I want: EDIT: Now I used an ImageFilterView: But I still need to
Using GridView in XML, getting java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView
Every time I try to start my app it crashes leaving this message in logcat Caused by: android.view.InflateException: Binary XML file line #15 in com.example.connect3game:layout/activity_main: addView(View, LayoutParams) is not supported in AdapterView Caused by: java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView This is my code: MainActivity.java activity_main.xml Answer your GridView is lacking numColumns property and also its children must
Android studio not showing ”sync now” option after adding some dependencies
when I add some whatever dependencie in the Gradle file then android studio should show the sync now option but it’s not showing. Android Studio Version 4.2 Answer Select “Sync Project with Gradle Files” from the top right bar manually.
FIXED What is wrong with my return in onCreateView
I have a problem with my Kotlin Android App. So far I haven’t written such a large project in Kotlin, so I totally don’t know what’s wrong. When I try to start my application, I recive a wall of red lines. I found some solutions (for Java) and tried to implement them to my code, but it didn’t work. and
Show the current date in a Datepicker
I have two questions; my app has 2 textview datepickers, both of which I will use for a record. My problem is: 1.- How can I do so that when displaying the datepicker (the box to choose the date); the current date is selected. 2.-How can I validate the start date with the end date according to my code; or
How can I disable focusable for all XML tags I have? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I’m writing an Android application in Android Studio on Java. I know that there is android:focusable=”false”, but I have too many files for doing this
Using “put” method of JSONObject in for loop (java)
I’m trying to use JSONObject’s put method in for loop. But I’m not getting Expected output. Expected output: OutPut I’m getting: here is my code: Answer Have you tried moving the construction of infoObj inside the loop. By having it outside, you’re maintaining state across loop iterations. I suspect you’re just updating the same json object each time and adding
unable to add Firebse to my android studio
I am trying to add firebase to my app and followed every step as told in https://firebase.google.com/docs/android/setup but as soon as a launch the app it crashes with the error I have also cross checked my gradle moudle and every thing seems to be fine, here is my gradle module Even in graple project everything seems to be ok to
SQL Insert query not storing upon button press
I am creating a project in which a database can be read and modified through an app. The tutorial for the insert section has lost me though. Using lowercase to begin a word causes a syntax error, fine. But, when capitalising the first letter it is accepted. The page then closes and takes you back to the main menu without