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
-
0
votes1
answer46
viewsFragments and how to pass activitys infections to them
I have to pass an Adapter string array of an Activity, which is where my database is loading into a Fragment, where I want to set this in a list, but nothing I try to do right. Would anyone have any…
androidasked 7 years, 4 months ago Beyond Soluções 1 -
0
votes1
answer269
viewsGoogle Maps and Directions stopped tracing routes
I’m using google maps and Directions and running. After 3 weeks two of my apps that use stopped tracing routes. On the Google console, I left the API key unrestricted since the app’s publication on…
-
0
votes1
answer64
viewswrap_content is not working
I’m having an error with wrap_content on android on my Imagebutton I set the image directly from a URL EXAMPLE: ImageButton img = (ImageButton) findViewById(R.id.imageButton);…
-
0
votes1
answer78
viewsGradle error - Startup failed
What’s wrong with my Gradle? apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion '25.0.1' defaultConfig { applicationId "com.example.thiago.myapplication"…
-
0
votes1
answer41
viewsError in Gradle - design
This is my Gradle : apply plugin: 'com.android.application' android { compileSdkVersion 26 buildToolsVersion '26.0.0' defaultConfig { applicationId "com.example.thiago.myapplication" minSdkVersion…
-
0
votes0
answers266
viewsSQL Server Connection
I’m trying to make direct connection to SQL Server, for testing, but at the time of testing "Register" by clicking the button, the app simply hangs, there’s something wrong in the code? package…
-
0
votes1
answer96
viewslistview Adapter repeats values saved in id
I am trying to bring the values of the database and click on a listview, I already bring from the database an object with the data (a list of "modules"), and I tried to pass the id of the…
androidasked 7 years, 4 months ago Davi Resio 187 -
0
votes1
answer231
viewsSelect Checkbox and enable fields on Android
I am using checkbox and edittext. When the application starts, edittext is disabled. When the user marks the checkbox, the edittext field enables. I’m having trouble enabling. I already put in…
-
0
votes1
answer64
viewsHow to place a method value inside a Listview
Good evening, I’m creating an app that generates random numbers for me, only I had an idea that makes it easier for the user.... When he wants to generate more than one block of random numbers, he…
-
0
votes0
answers114
viewsPut update object
What’s wrong with my put? It was supposed to update objects in my database,but it doesn’t work correctly,it doesn’t return any errors,. public String doInBackground(String... arg0) { String result =…
-
0
votes1
answer90
viewsSending data to MYSQL database with PHP
In my code below I send the data I need to PHP and it makes the insertion of the data in the Mysql Database. By clicking the register button, I send the data through a Hashmap, as I would send the…
-
0
votes1
answer864
viewsError validating android Studio field
Good morning Everybody, I’m making the following mistake: When trying to validate my fields by clicking the sign up button, the same does no action.. I’m new with android and would like a help.…
-
0
votes1
answer30
viewsTwo spinners that cannot have the same selected value
Hello, I have a code that has two spinners and that if we select an option in one spinner in the other that option ceases to exist , what I did was the following : Whenever you click on the spinner…
-
0
votes1
answer119
viewsHow to reference an object from one Activity to the other?
Good evening, I am developing an application containing several buttons, in which you can drag a button and drop in a certain place already defined in the application, and each button has to open…
-
0
votes0
answers62
viewsReal-time Audio Processing on android: Thread or Asynctask?
I’m starting to develop an android app that will "listen" to the audio and will draw its waveform on the screen. But the first step I wanted to just "listen" to the audio and show on the screen the…
-
0
votes2
answers55
viewsDuplicate random numbers
I created a class that contains a method that generates a random number from 0 to 61... in my Fragment I instituted within my event of button... My question is, how do I put the amount of times it…
-
0
votes1
answer210
viewsHow do I check the blanks?
It is a math average program, need help to check if the user leaves blank and click the middle do button. package suamedia.project.com.suamedia; import android.os.Bundle; import…
-
0
votes0
answers73
viewsError compileDebugKotlin
Error: Error:Execution failed for task ':app:compileDebugKotlin'. Compilation error. See log for more Details Build.Radle Modulo App apply plugin: 'com.android.application' apply plugin:…
-
0
votes1
answer29
viewsLogin authentication
I would like my password to compare the email also if it does not exist, but it only does the comparison of the password , how to compare the two together ? if (mEmail.equals(email)) { if…
-
0
votes1
answer102
viewsLoop of random numbers
Good afternoon, I’m trying to make a loop of my random numbers.... I have two spinner, one with a choice of how many random numbers and the other how many times it has to appear in a Listview... my…
-
0
votes1
answer546
viewsPopular Listview Shapes with Retrofit 2
Although there is already a similar question, not clarified my doubt, my problem is the following, the code below is from onResponse of Retrofit, I’m starting now in Java, I would like to play the…
-
0
votes1
answer487
viewsReturn of JSON array
My JSON returns more than one number. How to receive all and not one? I would like to set the return on one TextView. How to make it return all values and not only the first? JSONObject json = new…
-
0
votes1
answer456
viewsTextview does not appear for some reason
I’d like to do something like this in XML: I’ve tried with Linearlayout but I’m not getting it. <?xml version="1.0" encoding="utf-8"?> <LinearLayout…
-
0
votes2
answers626
viewsConvert json array to retrofit
I have the following return in json { "cardapio": [ { "tipoprato": "SALADAS", "pratos": [ { "prato": "ALFACE + REPOLHO ROXO" } ] }, { "tipoprato": "PRATO PRINCIPAL", "pratos": [ { "prato":…
-
0
votes1
answer189
viewsProgrammatically change specific Tab background
I own a TabLayout in which I programmatically create tabs in this method: mTabLayout.removeAllTabs(); for(int i = 0; i < list(); i++) {…
-
0
votes0
answers84
viewsGPS on, but no longer works in APP
td well? Next, I’m implementing a GPS code in my APP. It was working everything normal until then, until the time I tested turn off the GPS of the phone - to see if it gave error in the same APP.…
-
0
votes2
answers72
viewsHow to recover value of an integer and set in a alertDialog
When opening alertDialog the result is set to zero, follow the code calcular.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { String adulto =…
androidasked 7 years, 3 months ago Juliano Souza 155 -
0
votes1
answer216
viewsReturn Vector within JSON Retrofit Array
How do I bring information from one vector inside another json-format vector to retrofit: I have my return: [ [ {"prato":"BROCOLIS C\/ SALSINHA"}, {"prato":"ACELGA"}, {"prato":"ALFACE + JERIMUM…
-
0
votes2
answers37
viewsPhoto Album Android
I’m putting together an album, and with the code below, I can see all the images: @Override public View getView(int position, View view, ViewGroup viewGroup) { view =…
androidasked 7 years, 3 months ago Everson D. Ferreira 45 -
0
votes3
answers1340
viewsHow to recover all data inside the key in Firebase
I have this structure at Firebase. And I need to capture all the latitudes and longitudes that are inside each key, I did a test and it’s working if I put this data in a folder without the key it…
-
0
votes1
answer582
viewsWorking with 2 spinner on Android
I’m with two spinners in the same Activity. When I click 1 and select the value, the second needs to show the value related to which the user chose in the first spinner. Example: If in the first…
-
0
votes1
answer529
viewsEdittext with a maximum of one line
I see that to write in only one line on EditText needs to be with android:maxLines="1" and android:inputType="text", but I wonder if there’s any way to do this with android:inputType="number",…
-
0
votes2
answers37
viewsError creating PHP connection
When creating the connection Activity in the Connection.getRequestMethod("POST") field; does not accept the Post method. I’m new in the field, could help me? public static String postdados(String…
-
0
votes1
answer221
viewsToggle Tabs in Viewpager via the Fragment button
I wonder if there is any way to switch between tabs by the Ragment itself. I have a Viewpager with 2 tabs and I would like to switch via buttons because I validate some fields before switching tabs.…
-
0
votes1
answer178
viewsDynamic total according to Android Numberpicker
I am using Numberpicker so that the user selects the quantity. Each numberpicker has a total that already appears on the screen according to the amount selected by the user. Example: Numberpicker 1…
-
0
votes0
answers72
viewsNosuchmethoderror with Firebasemessaging
I’m getting the following error while running my app: E/AndroidRuntime: FATAL EXCEPTION: main Process: br.com.igoroliv.youtubecanal, PID: 29233 java.lang.NoSuchMethodError: No virtual method…
androidasked 7 years, 3 months ago Igor Oliveira 1,110 -
0
votes2
answers1165
viewsLayout in Alertdialog
I have this AlertDialog that shows on the other screen layout , in that layout has several EditText and a Button. How can I get the sword text of each of the edittext when I click on ok or the…
-
0
votes1
answer268
viewsPass value from Dialogfragment to Fragment
I have fragment1 and Datepickerfragment In the case DatePickerFragment extends DialogFragment I would like when selecting the date to return to Fragment. Only you’re giving it here:…
-
0
votes1
answer213
viewsUsing database coordinates in google maps API
I’m trying to use in Google Maps, the data that is in a database sqlite, But I’m having trouble accessing the shuttle’s return. I used the same logic to call using the database number and it worked,…
-
0
votes1
answer39
viewsExpandablelist comes hidden initially
Every time I start Activity with Expandablelist comes hidden, then I have to press the off button and turn it on so it shows. How do I fix it? my Expandablelist <ExpandableListView…
androidasked 7 years, 3 months ago adventistaam 3,354 -
0
votes1
answer74
viewsMathematical operation onBindViewHolder
I’m trying to do a mathematical operation by taking a number of Child in the firebase, more often than not the error of converting string... the getCounter this as Stringno model , more when I…
-
0
votes1
answer262
viewsTextview Imageview Constraintlayout Android
I am creating an app in android studio 2.3.3, but when placing an image using Imageview and a Textview it presented the following this view is not constrained.view <?xml version="1.0"…
-
0
votes0
answers335
viewsError creating multiple buttons in XML (Android Studio)
I’m creating an Android app that needs to have 20 buttons and each button of this will open a different screen. The application compiles correctly, but when arriving at the screen that has the 20…
-
0
votes1
answer120
viewsI think my table is not being created : no such table?
I am trying to make a check to know if there is something inserted in the table, but it always error in this row saying that there is no such table. my database: package…
-
0
votes1
answer378
viewsRecover Contact List Name List on an android Edit
All right, guys ? I have a problem in the development of an app, because when I call his registration screen before I want to take the name and phone of the selected contact and send to the Activity…
-
0
votes0
answers152
viewsOnitemclicklistener and Onitemlongclicklistener working together
I have a listview inside a Fragment and from each item I open a different Activity, but after I put a Onitemlongclicklistener to open a Alertdialog when each item is pressed the Onlistitemclick…
androidasked 7 years, 3 months ago Léo Santos 114 -
0
votes1
answer37
viewsHow to store the last 5 opening dates of an Android activity in a list
public class Activity extends AppCompatActivity { Calendar c = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat("dd:MMMM:yyyy HH:mm:ss"); String strDate = sdf.format(c.getTime());…
-
0
votes1
answer255
viewsPosition Textview Android Studio 2.2.2
I’m hoping that one TextView is positioned on top of a text, but it is on the side <?xml version="1.0" encoding="utf-8"?> <LinearLayout…
-
0
votes1
answer453
viewsError in Android Studio - Several messages of type `Cannot resolve the ...`
Good afternoon, I have an error in Android Studio and I can’t fix it. When I opened my project several messages like cannot resolve the symbol and in red they appeared, as it is in the image. Can…
-
0
votes1
answer38
viewsI can’t fix the bug with adUnitId
The command of the line ads:adUnitId="@string/banner_ad_unit_id" of xml is not recognized in any way by Android Studio. I just added import import com.google.android.gms.ads.MobileAds; in the…
androidasked 7 years, 3 months ago Boneco Sinforoso 817