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
-
2
votes1
answer50
viewslock R when resizing the window
In the R, It is possible to pick up and lock (hold) a device, draw an image and make the graphic render flush. This is useful for complex screen situations with hundreds of dots and/or color…
-
2
votes2
answers120
viewsProblem catching latitude and longitude android 5
My code does not get location on android 5, public void pegaLocalizacao() { LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); location =…
androidasked 8 years, 1 month ago Juliano Morche 116 -
2
votes2
answers436
viewsConvert float value to String
I’m programming for android, and I’m trying to display a float value found by function getX() in a Toast, which only displays String values. How do I do this conversion?
-
2
votes0
answers52
viewsRun Activity from another app
Is it possible to run an Activity from another app? I don’t want to call it through an Intent, something like this: public class AnotherActivity extends com.otherapp.app.ActivityName { // Aqui vai…
-
2
votes0
answers21
viewsadb.exe some when performing Cordova command
Hello, I have prepared the whole environment to work with Cordova: Installed Android Studio, Nodejs, Apache Ant, Java; I configured the environment variables and the PATH All right. However, every…
-
2
votes2
answers607
viewsHow to select a database blob and transform into bitmap?
I have the following error in my project, I select an image of the gallery turn it into byte register in the database, but at the moment of loading it to imageView it does not appear and not the…
-
2
votes1
answer1293
viewsDelete database when uninstall app
In my app I create the database done in Sqlite in the folder: System.Environment.Specialfolder.Personal But on some devices (Android) when uninstalling the app it seems that the database continues…
-
2
votes1
answer77
viewsAndroid Studio locked
My android studio IDE doesn’t work right, whenever I try to drag some element to the interface it crashes and just doesn’t respond anymore. The same happens when trying to create Fragments by the…
-
2
votes1
answer172
viewsHow to load Tableview Dynamically
I’m having trouble creating a menu dynamically by loading directly from a list. In my project this is the following way <?xml version="1.0" encoding="utf-8" ?> <ContentPage…
-
2
votes1
answer35
viewsComplex type Android ksop2
I’ve been working for days developing an application that consumes a Soap web service. Sending a complex type I’m getting, as I should do to send more of a complex type? The integration key I can…
-
2
votes1
answer1577
viewsOpen android app via php
I have a web system and would like to call/open an android app installed on a tablet through a button on my system. It is possible via php, javascript or html? Thank you,
-
2
votes2
answers278
viewsSending data between View and Edit Activity
I am developing a service scheduling system and in a Listview I can take a customer’s data and move to a Query Activity. I created an editing menu and would like to pass this same data to the new…
-
2
votes0
answers312
viewsEmulator: Error: Unknown AVD name [Nexus_5x_api_26], use -list-avds to see Valid list
I installed the emulator all right, however, when I run, this error appears there. I’m using Linux Mint.
-
2
votes1
answer816
viewsWorking with camera and gallery
I am with the following problem, in my application I take a photo and present her in a imageView, but when I take the photo she gets the good quality in the gallery imageView no, if it is a text not…
-
2
votes1
answer77
viewsHow to edit data that has already been saved in Sharedpreferences
Hello, I’m making an app and I’m saving some information in Sharedpreferences, which is user information, such as name/phone. I’m editing a profile and wanted to know how to change not only in the…
androidasked 6 years, 2 months ago Luis Felipe 162 -
2
votes1
answer58
viewsHold the image and send to link in Android Studio
Hold the image and send to link in Android Studio I use an Imageview that when I click performs a function, but I would like when the image was pressed, another action was done, which would be…
java android android-studio android-activity android-eclipseasked 6 years, 2 months ago Deodoro Júnior 21 -
2
votes3
answers969
viewsCreating an Activity and calling multiple Layouts can be harmful?
As I am still walking in the study of Android applications and read things in this regard, I wonder if, for example, I have only one Activity and several layouts being called from it, there is a…
-
2
votes2
answers132
viewsHow to get information from Satellites through Locationservices
There are app’s that show on how many satellites your GPS managed to communicate. Follow an exmeplo: https://play.google.com/store/apps/details?id=com.chartcross.gpstest I saw some examples where…
-
2
votes2
answers111
viewsError in delete button
Good Afternoon, I made a delete method in my database and called it in my Activity, only my problem is that when I click on the button it doesn’t happen anything, and doesn’t present me any error in…
-
2
votes1
answer420
viewsError while casting Edittext
I have a problem in my project saving the fields after the changes. On the detail screen I have a change button that when I click it plays to this screen that is below: I believe the error should be…
androidasked 8 years ago Artur Mafezzoli Júnior 441 -
2
votes1
answer243
viewsproblems when passing data to Edittext Android
I’m having trouble loading data from an sqlite table and sending this data to Edittext, which I may be doing wrong, when I open the screen returns this message in the log Cat 11-03 06:43:30.721…
-
2
votes1
answer103
viewsHow to set a string coming from a sqlite database to display in a Textview?
I’m trying to display a string value in a textview via a query in sqlite, but when I run the code a numeric log of the Android sqlite class is displayed randomly. I’m just trying to display the…
-
2
votes1
answer63
viewsgetLastLocation sometimes returns null
I use the following code to get the user’s location: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ... m_api = new…
androidasked 8 years ago Edson Santos 416 -
2
votes1
answer700
viewsHow to add Onclick in a Fragment?
I’m trying to add onclick in my Ragment, but I’m not getting it, where it’s wrong? @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {…
-
2
votes2
answers949
viewsWhat is the best way to pass a context to a nested class?
I have a nested class that’s used for a new Thread and it has some Toast to present some information to the user depending on the error. I tried to pass the context through the constructor, I…
-
2
votes2
answers499
viewsError android.database.sqlite.Sqliteexception: no such table: fs_promocoes
public class PromocaoDAO { private static final String DATABASE_NAME = "app_promocoes.db"; private static final int VERSAO_BANCO = 2; private static final String…
-
2
votes1
answer170
viewsCalculations with String in Java
I need to average some numbers I receive via JSON in the format of Strings, this calculation must return a value so that I can set it within a TextView on Android, but I’m not able to format this…
-
2
votes1
answer77
viewsAndroid: How to get username in Google Play Games
I’m developing a game and after the player does the sign in is redirected to another in-game activity. My problem is that I don’t know how to get the username of him in that activity in which he…
-
2
votes1
answer1020
viewsHow to fix the size of a button on android?
Could someone give me a tip on how to avoid the problem below? I have these buttons and I would like to leave them in a fixed size, so they do not ditor when the phone is rotated. I am using…
-
2
votes1
answer58
viewsNullpointerexception when trying to use interface to pick up data from one Ragment to another
I’m doing a program that creates graphs, that contains a page with two tab Fragments one for the graph and another for the algorithms I’m trying to make when a button is clicked on the algorithms…
java android android-fragment nullpointerexception interfaceasked 5 years, 7 months ago Gabriel Ricardo 31 -
2
votes1
answer244
viewsHow to block login access after 3 wrong firebase attempts
I was putting the lock after 3 wrong attempts on login, however I found in some forums that when hold malicious tries to force multiple passwords he will not use the email fields and password, this…
-
2
votes2
answers412
viewsReuse code on multi-button onClick
I’m developing an app where it will contain several buttons. I need your help to see if I can improve the code. Actions do the same thing just change the background color and pass me the button…
-
2
votes1
answer100
viewsRedeem Firebase information on a Textview on Android
All right people? I would like to rescue the information from Firebase in a Textview on Android. I can already enter the information in the Database, as shown in the following image: I would like to…
-
2
votes2
answers831
viewsCheckbox condition isChecked
Hello, I am using a Checkbox and I would like that if it was Checked, it becomes visible a Layout. I’m using the code below and it only works for when it is clicked, but I already want to leave it…
-
2
votes1
answer626
viewsProblems to capture Enter key on Android
I’m having trouble capturing the key Enter in the Android begin if(Key = 13)then ShowMessage('Você teclou '+ KeyChar);//Para testar se estava capturando algo end; I only get feedback by pressing the…
-
2
votes1
answer203
viewsIs it possible to use variables to set the size of a View?
I am beginner in the development and applications and the application I am working in need that the user give me a value (distance in meters) and from this value I will adjust the size of the image…
-
2
votes2
answers336
viewsHow to eliminate the space left by invisible views on the screen?
I am working on an android application and my question is: When the user logs in the application, it checks the permissions of the same. How can I make this button invisible and organize so as not…
-
2
votes1
answer607
viewsno such table: tbcarro
After following some examples, I am doubtful about the following error: 11-24 20:49:14.803 18215-18215/tiburski.rg.cadastrocarro E/SQLiteDatabase: Error inserting nome=ggggg modelo=ggggg placa=hhhh…
-
2
votes2
answers1290
viewsError: android.database.sqlite.Sqliteexception: no such column:
I added a column in the Users table, invited is an integer. I need to make a select in the table filtering this field, and I get the following error: android.database.sqlite.Sqliteexception: no such…
-
2
votes2
answers558
viewsSave Image with Better Resolution
Hello, I am saving images in the database. But the resolution is very bad. I am using the following: btncamera.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {…
-
2
votes0
answers21
viewsRestore data
I am creating an app that contains a form and when the user clicks on an address search field it is taken to another Activity and then this address is retrieved in a textView in the initial Activity…
-
2
votes2
answers1661
viewsHow to sort a Map by key in Java
I’m trying to use a loop to show the grouped information of a Map. for(Map.Entry<Date, List<Exam>> entry : groupedList.entrySet()) { setNewList(entry.getKey(), entry.getValue()); } But…
-
2
votes2
answers2323
viewsError "is not an enclosing class"
I’m doing an exercise in Handler just to test how it works, but I’m trying some problem that I can’t understand. This is my master class code: public class MainActivity extends Activity { protected…
-
2
votes0
answers168
viewsFilter in listview takes item from wrong position
In Listview without using the filter when you click it shows the correct data in the other Activity, but when you filter one item it changes the position and passes another ID the data has nothing…
-
2
votes1
answer88
viewsPosition button on top of ad
Hello, I would like to know how to put a close ad button in the corner of the screen, on top of the ad. I even tried here more takes space from the webview above and is not transparent the part, for…
-
2
votes1
answer96
viewsUnable to create an instance of the android studio class
public class HomeFragment extends Fragment { private RecyclerView categoryRecyclerView; private CategoryAdapter categoryAdapter; private HomeViewModel homeViewModel; public View…
-
2
votes2
answers46
viewsProblem to check list
I have a problem that I don’t understand because here’s the thing: When I go to add an item to the list, it has to check if that item is already in the list but it is not doing that.…
-
2
votes1
answer48
views -
2
votes1
answer57
viewsIs this path valid for all devices?
I am developing an app. It has the function of saving image in an own folder of the app. And I am using the following code : File file = new File("storage/emulated/0/PastaTeste/");//PastaTeste é a…
-
2
votes1
answer574
viewsAndroid - Error with setContentView(R.layout.Home);
Good afternoon, I’m having trouble with setContent it reports the following error: Cannot solves Symbol 'Main' This is happening in the -> protected void onCreate(Bundle savedInstanceState) {…