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
answer895
viewsFirebase for a List
I need to take all the data from firebase and create a list, to use in a listadaper that I created. This is the structure of the Bank in Firebase: As you can see, I want to get all the child…
-
0
votes1
answer42
viewsAndroid Webservice Error while using Android 4.2
Hello ,I am developing a project where I need to pick up and send values to a server. I did everything and worked perfectly in the version 7.0 of android, but when going to 4.2,begins to give error.…
-
0
votes0
answers47
viewsI want to get the same ID
Good afternoon I wanted to know if it is possible to get the phone ID for the same functions or as in the example below. I want to put the ID that’s marked black under the "SMS". Is it possible to…
-
0
votes1
answer254
viewsCustom Recyclerview Blanks
I’m having trouble in my custom list is with too much blank item space for each other Follows code <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"…
-
0
votes0
answers68
viewstwo listview on the same screen but only one appears after execution, helps
I’m trying to make a screen for an app, where I want to put a text, a listview and then one more text and another listview. I made the codes, but at the time of execution only appear the two texts…
-
0
votes0
answers139
viewsReturn Null even with registration in Sqlite database
I’m having a problem making this query where I’m looking for the product code and service code. If I make a select without WHERE I get results but doing this way my Product object always returns…
-
0
votes1
answer43
viewsHow to get the Primary key of an item in an orderly recycleview
I have a recycleview populated with a Realm bank, if I don’t sort, my code works because it puts in the ID order ( Primary key ). However I want to sort alphabetically, and when I do that my code is…
androidasked 7 years ago Igor Oliveira 1,110 -
0
votes0
answers25
viewsWhat are the risks in using Singleton in java
Hello, What are the risks of error when using the Singleton practice in java? I am using the following: private Os mInstance = null; private int numeroOs, updateServer; Context context; public…
-
0
votes1
answer153
viewsCollecting Facebook Data with a Boot Share
Good afternoon! I am doing my TCC and need urgent help! Please! Next... I’m making my app that at the end of the application the user can share, if you want through a shareDialog of the face...…
-
0
votes1
answer104
viewsUse findViewById in all scopes or use a variable?
Which of the most recommended strategies for a good application performance? Using findViewById whenever we use some element of View or to do so only once by assigning to a variable? example in…
-
0
votes1
answer315
viewsTimeout Android Connection and SQL Server using JDBC/JTDS
I would like to limit a time for the connection. Every time she doesn’t find the Host to connect, she keeps trying and it takes. Here’s the code: @SuppressLint("NewApi") public Connection CONN() {…
-
0
votes0
answers43
viewsWhat method to use to not show the json data on the php page that serves as a request for android app
Good evening, I have an android app and I am using this php code for the request of a json and I wish that the data would not appear when someone used the url, because so can see the exit…
-
0
votes1
answer169
viewsGetting information from an Objectjson without Array
I have the class below and I can find the information of a Jsonarray in this format: {"client":[{"id":"1334","name":"Bruno"}]} TextView nome_usuario; private static final String TAG_CLIENTE =…
-
0
votes0
answers32
viewsAngulation capture
I’m doing a project that consists of capturing the angulation of movement using the cell phone. The angles have already been calculated and are working. The problem I’m having is with the following…
-
0
votes0
answers45
viewsShow a set of images in a new layout from a list
Hello, i have an Activity class, which shows a layout with a list of items, which when clicking on each item, would show a new layout (books2), with a viewFlipper, however, each item in the list…
-
0
votes0
answers625
viewsAndroid Studio imageview error with photo
I’m developing a mobile app Android in the Android Studio version 3.0.1 and I’m standing by Sansung Galaxy grand duos version 4.2.2, the program runs normal but when I put the imageview the…
-
0
votes1
answer127
viewsManage android library versions
Currently in my application I have the following imports library in my build.gradle: compile 'com.google.android.gms:play-services-maps:+' compile 'com.google.android.gms:play-services-gcm:+'…
-
0
votes0
answers117
viewsI am unable to modify the layout when opening the keyboard
I’m trying to "decrease" the layout when opening the keyboard, but I’m not getting it, it’s inside a ScrollView and I realized that he ignores the free space below the views (where there are no…
-
0
votes1
answer153
viewsHashmap overrides values
I am trying to generate a hashmap (String, List Exercises) from a json: [ { "grupo":"Joelho", "nome":"joelho_1", "habilitar":"1" }, { "grupo":"Joelho", "nome":"joelho_2", "habilitar":"1" }, {…
-
0
votes1
answer495
viewsBotao FAB does not stay in place
I do not know what is happening the FAB button climbs on top of another component when compiling, but in the preview it is right. <?xml version="1.0" encoding="utf-8"?>…
-
0
votes1
answer430
viewsCordova: Ajax works in browser but not on Android device
I need to make an ajax request using Cordova in visual studio, and ajax through Jquery. When I test through the browser works correctly, but when I test Android it returns error with stauts "0" and…
javascript jquery android ajax apache-cordovaasked 6 years, 11 months ago Anderson Brunel Modolon 1,111 -
0
votes1
answer383
viewsConvert an Object to Arraylist<Visitor>
I have a method that returns values from firebase. When received, I create a new ArrayList<Visitante> and the saved in a Object. ArrayList<Visitante> visitantes = new…
-
0
votes0
answers85
viewsAndroid - Error when buildar App in mobile debug
I’m having a problem doing Debug and generating a signed Apk, when I open the application is generated an error, I’m not able to figure out the solution to this error, in the simulator of Android…
-
0
votes1
answer100
viewsPOST requests with Android loading icon
I’m making an Android application that will make some requests to an API, I generalized these requests in a class (Requestapi), where, to use it, just create a map with the information I’ll send to…
-
0
votes1
answer137
viewsBottomnavigationview is not at the bottom of the screen
I am with a problem is a layout I am developing, this is my Activity for customer registration and I have only in it a Bottomnavigationview, and a Linearlayout that I will replace with a Fragment…
-
0
votes1
answer33
viewsFragment not being loaded inside Framelayout
I created a Navigationview with 3 items, when clicking on one of them, a specific fragment should be loaded inside the Framelayout, but this is not happening. I believe the error is in XML, because…
-
0
votes0
answers65
viewsCalling another screen on android
public static class PlaceholderFragment extends Fragment { public PlaceholderFragment() { } @Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle…
-
0
votes2
answers70
viewsWhy can’t I use Onbackpressed Listener within Ragment
I have a navigation Drawer that opens several Fragments, I want to click and return, check the visibility of a layout and do something with it, and instead of closing the app, but I can not override…
androidasked 6 years, 11 months ago Igor Oliveira 1,110 -
0
votes1
answer357
viewsjava.lang.Indexoutofboundsexception: Invalid index 2, size is 2
I’m having an error to save my package’s vigencias, I’m passing the array position. which may be wrong? int position = 0; for (Pacote pacote: pacoteList) { Vigencia vigencia = new Vigencia(); if…
-
0
votes1
answer942
viewsAndroid studio Activity does not open with click button
My problem is the following. my application has a welcome screen where the user ckick the "continue" button and goes to the next screen. The next one contains a menu with several buttons. my problem…
-
0
votes1
answer68
viewsAndroid - Save and Update String sent from one activity to another
//I can send and receive two different values in one @Override public void onBackPressed() { if(checkBox.isChecked()) { String trueThumb_check = "checked_thumb"; Intent i = new…
-
0
votes1
answer46
viewsBottomnavigationview does not work on first click
I’m having a problem in my forward menu, it does not work when I click the first time, it is necessary to click twice to perform the action…
-
0
votes1
answer39
viewsRecyrcleview Android
In my case I will need to put several buttons in a recyrcleview has to recognize on which button was clicked or only the position of an item in the list? <TableRow android:id="@+id/tableRow1"…
-
0
votes1
answer71
viewsLink color declared in string.xml (Versions below N)
I have the following text stated in xml string.: <string name="TITLE_EXAMPLE"><![CDATA[ <p>Para entrar em contato com nossa Central:</p> <p><b>Brasil:…
androidasked 6 years, 11 months ago Thiago Luiz Domacoski 7,310 -
0
votes2
answers182
viewsNullpointerexception when obtaining latitude and longitude
I am developing a mobile application with Android Studio that aims to get the information of latitude and longitude and use the service of Google Geocoder to return the address of the geographical…
-
0
votes1
answer235
viewsOnclick on android not working
Buenas pessoal, ok? I’m using a Recyclerview to popular my list on Android and for such have an Adapter and a view Holder. Follow Adapter source code with Viewholder public class MoviesAdapter…
-
0
votes2
answers66
viewsEmail and password in the Android Studio app not registered in Firebase
No type of error appears when I click to register the button, I have put all types of password sizes and even put my own valid email only that does not register in firebase authentication. private…
-
0
votes1
answer18
viewsHow to get button that is inside include
I have a Fragment, which contains a Viewpager that inflates 2 views for now, but will have a button next in all layouts so I made a separate file with this button, and however I can’t catch it to…
androidasked 6 years, 11 months ago Igor Oliveira 1,110 -
0
votes1
answer781
viewsRuntime permissions on android
I have a code in android studio that asks the user, permission to use the phone service (to pick up Imei) well, my code is working perfectly, with a problem, when entering the page, a message is…
-
0
votes1
answer1147
views -
0
votes1
answer205
viewsDownload svg image to present in Imageview of Android as?
I have an api https://restcountries.eu/rest/v2/all that returns me a json on Android. This json is binded to a class using Jackson. But I need to use the url that is contained in the json that is a…
-
0
votes2
answers144
viewsinsert a cursor inside of a while on android
on android i have a cursor where it searches the data in the database and returns the data perfectly but.. as I insert a second cursor inside the first? to pull data from a second table my code try…
-
0
votes0
answers119
viewsHow to insert a Firesotre Cloud list into an Expandablelistview
How can I enter data obtained from the Cloud Firestore into a ExpandableListView? I have a document "Places" in a collection "Categories". The document has a vector, also called "Places", with 5…
-
0
votes0
answers50
viewsError parameter always null
I’m trying to make a registration system when I click the button, everything goes right but the parameter is getting null always. (Even if I define in a string) String url = ""; String parametros =…
-
0
votes1
answer403
viewsDisable chosen date in Datepickerdialog
Hello, everybody, all right? I wonder if it is possible, through the Datepickerdialog, to disable dates that users have chosen? Like, users choose a datepicker date that can no longer appear to…
-
0
votes2
answers49
viewsProblem in my search engine code
As I can not use searchview I decided to use an edittext and a logica q found on a forum, but I go through difficulties have some idea? Mainactivity.class public void CarregarEncontrados() { int…
-
0
votes1
answer225
viewsStackoverflowerror Retrofit With Basic Authentication
I have a Servicegenerator that creates the retrofit for min, it works great when I sign in and password for it, but when I try to use it without these options, my code goes into a loop and crash the…
-
0
votes1
answer560
viewsShow Toast in a non-Activity class
I’d like to exhibit a Toastwhen the user does logout. I have this structure: Within ConexaoFirebase, I have a method called logOut: public static void logOut() { firebaseAuth.signOut(); } and within…
-
0
votes1
answer328
viewsBasicnetwork.performRequest: Unexpected Response code 500 for
I am developing a mobile application that will consume services from my server, developed in the Play Framework. I have already created the login service as below: public class Services extends…
-
0
votes1
answer124
viewsAndroid Volley post compilation error map
Hello, The code below only compiles if I comment on the map section, but I need it to fill in the post parameters. Erros: method onresponse onerrorresponse does not override its superclass There is…