Most voted "android" questions
Android is an operating system for mobile devices developed by Google and the Open Handset Alliance. Use this tag to reference questions related to programming for Android and be relevant only to this operating system. Use the [android-subject] tag instead of [subject] alone.
Learn more…8,935 questions
Sort by count of
-
3
votes1
answer2372
viewsHow to add the eye to display the password in Android Studio?
I created a login form in my application and would like to put the eye button so that you can display the characters of the login field, as shown in the screenshot: I’ve done some research and tried…
-
3
votes1
answer4015
viewsAndroid Gradle - Error:Unsupported method: Baseconfig.getApplicationIdSuffix()
When importing a Github project using the Android Studio 3.0.1 I got the following error in Gradle: Error:Unsupported method: Baseconfig.getApplicationIdSuffix(). The version of Gradle you connect…
-
3
votes3
answers2244
viewsPosition Button in the center of a Linearlayout with layout_gravity
I’d like to know why I can’t center the button, I’d like to center vertically and horizontally, but it seems to center only center horizontally in the vertical layout and vice versa. <?xml…
-
3
votes1
answer1007
viewsAndroid - What is the difference between getReadableDatabase() and getWritableDatabase()?
I was able to enter information in the database using the method getReadableDatabase(). In that case shouldn’t it be wrong? Shouldn’t it be the method getWritableDatabase()? private void savePet() {…
-
3
votes2
answers866
viewsCompare using String.Contains() disregarding accents and case
I know there’s already question, I even used the same title to call attention, but this one refers to C#, I’m having this problem in java, code: //historico e searchC são ArrayLists, no caso do case…
-
3
votes1
answer79
viewsCamera does not work
I tried to access the camera phone, it worked 3 times, then the screen went black (Print below) in API 24, I tested it on a mobile phone with API 22 and it worked, with API 24 no, someone knows how…
-
3
votes1
answer60
viewsAn app’s background color ratio x energy efficiency
Thinking about a mobile application, which is the best color palette in relation to energy consumption? For example, let’s say I’m developing an app and want to focus on battery consumption.…
-
3
votes1
answer275
viewsSeparate line contents in the Bufferedreader loop
I have files txt with approximately 5,000 items, and these do not have a pattern, for example: 10 20 30 40 50 60 70 80 90 100 I need to import this into the SQLite, where each value is 1 record.…
-
3
votes1
answer855
viewsHow to make GET and POST requests on android, with a quick and updated tool?
I am currently using the volley for web requests. But I’m finding this tool too slow. I googled looking for alternatives, but all results I find are old, 2017, 2016 down. About the org.apache.http…
-
3
votes1
answer180
viewsCentralize Recyclerview Items with Flexboxlayoutmanager
I’m using Flexboxlayoutmanager to align the items, but I need all items to be aligned in the center, regardless of the amount of items (dynamically). I want these items to stay like this: But what…
androidasked 6 years, 6 months ago felipe.rce 1,969 -
3
votes1
answer76
viewsRun adb in multiple Docker containers
I have four phones connected via USB. I have two containers docker running on my machine and each of them has a adb spinning. Adbs select cell phones randomly, I would like to map two cell phones to…
-
3
votes2
answers309
viewsError while updating Java
A standard notification came up saying that there was a new Java update available, so I decided to update. After the update I can’t run my apps on Eclipse and the following message appears: Imports:…
-
3
votes2
answers1131
viewsonDataChange(), in addListenerForSingleValueEvent(), is only executed after my method returns
I’m trying to check if a given email exists, with android using firebase I’m doing this way : public boolean existeEmail(String email) { final boolean[] retorno = new boolean[1]; final…
-
3
votes1
answer972
viewsWhat is considered a failure in the Google Play Console
I accessed the statistics of my app in Google Play Console and noticed that there are several notes of failures, but there is no ANR and the crashlytics registered very few crashs, which leads me to…
-
3
votes2
answers565
viewsIs it possible to call Onclick from Textview a new Activity?
Hello, I’m trying to call a new Activity through OnClick in a TextView, but when running the application generates a crash. Here’s the Activity of from the one I’m trying to get through: public…
-
3
votes2
answers102
viewsProblems using camera, generate, edit and save image
I’m trying to create an app, and part of it is to use the camera phone to take a photo, which will automatically be decreased and saved in separate folders per year / mes/ imgHora.jpg. For older…
-
3
votes2
answers385
viewsProblem with notification icon
I know there are several questions related to this. However, I have found nothing with my specific case. I will explain... I use the same code to display a notification both for notifications when…
-
3
votes1
answer118
viewsData from Firebase takes a long time to complete loading and hinders sorting objects
I’m trying to sort an object by a value that comes from Firebase. I use a Jsonparcer class to list the database and according to the ID take the field I need in Firebase, which in this case is a…
-
3
votes4
answers496
viewsHide element from Activity
I am using an Activity that has the following elements: <fragment xmlns:android="http://schemas.android.com/apk/res/android" xmlns:map="http://schemas.android.com/apk/res-auto"…
androidasked 5 years, 10 months ago Regina Moraes 43 -
3
votes1
answer54
viewsBest practices/correct way to upgrade your local base
Good morning, I got an APP started by a colleague in the company. The problem is that I’m not flying yet with android. I need to make changes to the structure of the local bank (With the APP in…
-
3
votes3
answers1314
viewsHow to handle different date formats?
I have an application that at a certain time I recover the obtained date from the system, save it in a table in the database (Sqlite) and then recover it. The problem is that in determinator devices…
-
3
votes1
answer355
viewsRun Html5 inside Webview android
I have a page in Html5, where I would like to open it in Webview android, but it seems that Webview does not interpret javascript. There is a better Webview? See my code: Mainactivity package…
android html5 android-studio android-layout android-activityasked 5 years, 6 months ago Tiago 2,377 -
3
votes1
answer270
viewsFunction . filter() for a List<Class>
I have a class Pessoa that has the columns Integer id. String name, and String date_born. In my main Activity I am already retrieving the list of people that comes from my request made in the API…
-
3
votes1
answer94
viewsIs it possible to improve that part of the code?
I need to improve a part of the code. My problem is it’s too repetitive if and else, the bad news is that I will have more repetitive things on account that are different games. I can improve this…
-
3
votes1
answer40
viewsonKey() method is not triggered as desired
I’m trying to capture the enter key to jump from one EditText to another. The problem is that the method onKey() is not called when I press a key, for it to run I need to hold the key for a while.…
-
3
votes1
answer2470
viewsWhat is the difference between PWA and TWA (Trusted Web Activities)?
I happened to be watching the Chrome novelty, and I saw a post Using Trusted Web Activities, it says: Trusted Web Activities are a new way to Integrate your web-app content such as your PWA with…
-
3
votes2
answers2369
viewsDelay in publishing APP - Play store
Good morning, I’m in doubt about publishing my first public APP in the google store. I published on 15/08 and until today (20/08) the APP is still with status of 'Draft'. My impression is that this…
-
3
votes2
answers613
viewsConvert an Arraylist<String> into a String[]
I need to pass on the values that are in my ArrayList<String> for a String[] because I need to make a setInputData("INPUT",input). I mean, I want to convert the next ArrayList<String>…
-
3
votes0
answers104
viewsHow to proceed to implement a Preparedstatement on Android?
We are using the Sqldroid to work as a JDBC driver for Android. However, Sqldroid is an envelope for Android API calls, and this API does not deal well with nulls. So, for us to use…
-
3
votes1
answer42
viewsChange color of the icon of a selected Tab
I’m developing tabs in Android Studio with com.google.android.material.tabs.Tablayout and would like to change the color of the icon, only of the selected tab. The icons are in SVG. And the text and…
androidasked 3 years, 9 months ago Denner Luan 68 -
2
votes3
answers3415
viewsHow to interpret the use of the CPU through the monitor of the options of Android developers?
Android has in its developer tools the option to display CPU usage. Would you like to know how to interpret them? Or, some other app which performs the same type of service for analysing the…
-
2
votes2
answers1179
viewsHow to move an icon on the map behind my location?
I’m doing a project that uses the API v2 from Google Maps. On this map appears my location that will be updated as I move. I put an icon with the police image, and I wanted that icon to come after…
-
2
votes3
answers2371
viewsCreate a button in a Listview
I am making an application and at the end of the data inserts the user will view a summary with a listView. So far so good, but I want to create, right down after the listview, a finish button, but…
-
2
votes2
answers5433
viewsHow to finish layout Android App?
How it is done to customize the layout of an Android application. I have seen Apps so well finished and wanted to learn how to give such refinement to my Apps. The App Toshi Finance is a good…
-
2
votes2
answers694
viewsRunning on Multiple Screens
How to define a layout to run on multiple screens without creating multiple Layouts? It is possible or would have to create specific Layouts?
-
2
votes1
answer79
viewsIs there a way to avoid the size specifications in the Android layout?
I work with Android on a day-to-day basis, and I would like to avoid the size specs views. For example: If I make a TextView, i have to assign Height and Width properties, so: <TextView…
-
2
votes1
answer894
viewsHello World on Android consuming a lot of RAM
I’m doing an application and I noticed that it is consuming a lot of RAM, approximately 70MB. I have a button that inflates an extra layout with random data and that keep changing dynamically that…
-
2
votes2
answers2748
viewsReading text file stored in raw folder through a user class
I have a test code that works fine. The function of the test is to read a text file that is in a res raw folder. It reads the text file smoothly and stamps its content line by line through Toast.…
-
2
votes5
answers1154
viewsMap does not load, showing error
I’m starting to develop on Android, only I came across a problem to generate a simple map, I’ve seen and reviewed the documentation of Google Developer and other internet tutorials that show how…
-
2
votes1
answer2235
viewsHow to create a widget?
I have in mind the @xml/widget_info the receiver in the Manifesto the layout of the widget and the Provider class is what I doubt. What it needs to have?
-
2
votes1
answer276
viewsAdd Elements Programmatically
I have a certain part of an application in which there is a random questionnaire. Generated by the user himself. The point is, I don’t have access to the amount of questions or what the questions…
-
2
votes2
answers1722
viewsColumn size on a Gridview on Android
I have in my android project a gridview that I define as follows: <GridView android:id="@+id/grid1" android:layout_width="600dp" android:layout_height="fill_parent" android:padding="5dp"…
-
2
votes2
answers758
viewsEclipse Debugger does not advance on Android application
I’m having a problem trying to debug an Android application in Eclipse. When I press F5, F6 or F8, simply the break point line does not pass to the next instruction (line), it is stopped. I had…
-
2
votes1
answer157
viewsInsert Android App into another Android app
Imagine that I make an Android app that can be included within apps from other Android developers. They don’t have access to my source code and can at a certain place in their app include my app. If…
androidasked 10 years, 8 months ago user3267188 21 -
2
votes0
answers146
viewsSignatures return null 'INAPP_PURCHASE_DATA' using 'In-app Billing V3'
I am implementing the purchase of Subscriptions in an Android application. So far, payment orders are already configured in the 'Google Play Developer Console' and I can debit the amount set in each…
-
2
votes2
answers250
viewsGooglemapsv2 to work in production version
My app works with Google Maps perfectly in the debug version, but when I publish it in the Play Store it stops working. What is the process for generating the Googlemapsv2 hash for the release…
-
2
votes2
answers1138
viewsRecover Edittext from Fragments in Activity
I have an Activity with Actionbar and three Tabs, in each Tab is loaded a different Fragment and in each Fragment of this I have a form. When you finish filling the three forms, when you tap the…
-
2
votes1
answer1054
viewsHow to implement back in Android Webview
I have an Android Activity with only one webview inside. For example: <WebView android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="fill_parent"/>…
androidasked 10 years, 8 months ago Leonardo Otto 2,328 -
2
votes1
answer89
viewsCharacter problems coming in Ndefmessage NFC
I am making a program that exchanges messages for NFC, and I am having a problem that when I want to pass a Parameter in the message appears all right now when I want to pass 2 parameters, so there…
-
2
votes1
answer2587
viewsCamera app stopped working when upgrading from Android 4.0.4 to 4.1.2
I’m new with the platform and I’m having trouble in an app I’m developing, it was working normally on Android 4.0.4 and now that I upgraded to 4.1.2 the following message is displayed: 02-27…