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
-
1
votes1
answer171
viewsAdjust Constraintlayout
I’m trying to adjust a layout using the new ConstraintLayout, but I’m not getting it, could you give me a help? follows below my layout: <android.support.constraint.ConstraintLayout…
-
1
votes0
answers706
viewsHow to pass an object to another Activity
public class Despesa { private long id ; private Date data; private String local; private String endereco ; private String cnpj ; private LinkedList <Item> itens; private String URL ; public…
-
1
votes1
answer1147
viewsDelete data from Sqlite database
I’m making a database program. I wish I had the option to delete a data from database Sqlite. So here’s what I did: In my OpenHelper called the following method: public void delete (){…
-
1
votes1
answer80
viewsHow to use tabs with items within the same xml without using Fragments?
I have a Activity where I’ll just need 2 tabs, one that will open right away telling a story using simple textview, and another about members of a team using gridview. I didn’t want to use Fragments…
-
1
votes2
answers112
viewsCapture the moment the mobile screen was lit and when it was deleted
Hello ! I’m building a project similar to an alarm clock but I’m having a hard time trying to use the broadcastreceiver class. Problem: I want to capture the date and the exact time that the mobile…
-
1
votes1
answer42
viewsReferences to several Edittext
It is possible to reference several elements at one time? Ex: An array with all tags and another with Edittext: public class Main extends AppCompatActivity { String[] tags = {"edit1", "edit2",…
androidasked 6 years, 8 months ago Woton Sampaio 1,461 -
1
votes1
answer303
viewsReceive Json with empty arguments
I created an API to receive database data via json for my android application, but some columns of my table get null, generating an empty json argument that is generating error in my application,…
-
1
votes1
answer22
viewsError in Networkinfo
I have the following problem, I have a method that checks whether the device is connected to the internet or not public static boolean isNetworkAvailable(Context context) { ConnectivityManager cm =…
-
1
votes1
answer67
viewsRun service even if the app is not open
I am creating an alarm clock app and in the tests I would like it to wake up (in this example it still vibrates), but I am not able to make it run in the background and so does not end up awakening,…
android services broadcastreceiver android-alarmmanagerasked 6 years, 7 months ago Eduardo Rafael Moraes 710 -
1
votes1
answer132
viewsTest APK Dependency Conflicts
In an old application I was updating the version of the dependencies of Gradle, when running I received the following message regarding a conflict between the version of the dependency…
-
1
votes1
answer57
viewsHow to take the return of this method
I’m using the lib betterpickers, I tried to make a class to take your information form OO, however the method does not have a return, it is a void, there is a way to catch this return? public class…
-
1
votes1
answer42
viewsListview is showing nothing
I have the class answer public class Resposta { private String Nome; private boolean Certo_Errado; public Resposta(String nome, boolean certo_Errado) { Nome = nome; Certo_Errado = certo_Errado; }…
-
1
votes3
answers206
viewsDynamic Array - Android
How to create a dynamic array in this way: //Apenas um exemplo abaixo: String valor0 = "1;2;3;4;5;6;7;8;9;0"; String valor1 = "1;2;3;4;5;6;7;8;9;0"; String valor2 = "1;2;3;4;5;6;7;8;9;0"; //Um array…
-
1
votes2
answers30
viewsComponent with same height
There is a way to make a Linearlayout to have the same height as a Textview? <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"…
-
1
votes1
answer48
viewscolumn 'Minhacoluna' does not exist - Android Sqlite usage
Hello, I’m trying to recover the recorded data in my database, however, when I run a function to return the value of one of the columns created in the Sqlite database in the memory of the mobile…
-
1
votes1
answer38
viewsError trying to open map with path disabled
So far, the goal of this application is, when opening, locate the user and display some points already mapped. When the app opens (location disabled or not), it asks if the user allows him to use…
-
1
votes1
answer282
viewsNullpointerexception when using setText for a Textview in Fragment
I am creating a Fragment where I have in one part the map and in another an object of Retrofit, where I get date and time from a server. The error occurs inside the Retrofit onResponse call, where I…
-
1
votes1
answer89
viewsAutofocus in Edittext does not work
I have a EditText that always needs to be in focus, and a Button whichever: <EditText android:id="@+id/edtCod" android:layout_width="match_parent" android:layout_height="wrap_content"…
-
1
votes0
answers83
viewsKeep your focus on edittext after pressing Enter
I have a barcode reader that does the action of putting the text in edittext and pressing enter automatically, I implemented the function while reading but I would like the focus on edittext to…
-
1
votes1
answer341
viewsConverting JSON to android arraylist
Good afternoon! I’m trying to consume an API on android but I’m having difficulty because in the JSON file it brings a category, I tried to add the variable "acronym" but it did not work; the JSON…
-
1
votes1
answer565
viewsHow to pass parameters from one Fragment to another Fragment in the same Framelayout?
I have a main Activity that has A frameLayout. FrameLayout starts with Fragment. Fragmenta has a button that calls Fragmentb opening in the same frameLayout, replacing Fragmenta. How to pass…
-
1
votes1
answer114
viewsCast in a Soapobject
I have the following code to consume one WebService: public List<Convenio_Conselho_Grid_BD> Pesquisar_Convenios(int pCodigo_Entidade) { SoapObject request = new…
-
1
votes1
answer373
viewsAndroid - How to create and combine two tables within a list of Sqlite tables on Android?
I’m creating an app to monitor aquarium settings using the following schema: The user can monitor as many aquariums as he wants, but every time he adds a new tank, these two tables should be created…
-
1
votes1
answer144
viewsHow to use the Strings file inside the code
Hello, inside the Mainactivity XML in Android Studio I can use @string/STRING I would like to know how I would reference a string I have inside the strings.xml in the res folder of Android Studio.…
-
1
votes0
answers726
viewsChange the text color of a button via XML by clicking on it
Good afternoon ! I’m creating a styleGuides for an android application and I’m having difficulty changing the color of the button text at the moment it is clicked by the user: In this example I am…
-
1
votes1
answer67
viewsFirebase database reset data when soon
I was studying Firebase and created a login method with email and password, but I did not want to use this, so I learned to use Google Auth, so I decided to associate the google auth account in the…
-
1
votes1
answer63
viewsI’m having trouble opening an Activity Fragment
I’m using trying to set a floating button for this action: Xml: <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"…
androidasked 6 years, 6 months ago Paulo Eduardo 31 -
1
votes0
answers397
viewsClear Screen after Transition - IONIC app
I’m creating an app with Ionic and angular, and I’m making use of tabs. I have 5 tabs, and one of them displays a "Menu" page, this page contains the listing of other pages that are not in tabs,…
-
1
votes1
answer512
viewsAndroid - Hide Actionbar buttons
I made a code for a button to be pressed to display an Edittext. But I only managed to hide the title and icon of the application. So how do I hide the buttons too? Mainactivity.java: package…
-
1
votes1
answer467
viewsDisplay data list in order of date. Firebase
Hello, I’m with a barrier how to bring the data from firebase and display in order by date, display from the latest to the oldest, currently the data are being displayed in standard form in…
androidasked 6 years, 6 months ago Robson Cabral 33 -
1
votes0
answers21
viewsSet field to search on a Spinner
I need a research field on top of mine spinner not to use the on-screen scrolling and save time for the user. Thank you. Code in which the spinners are executed: public class FormularioMateriais…
-
1
votes0
answers25
viewsTextfield with initial value in Constraintlayout
I am unable to identify the error in the XML specification, with each character added at the Textfield startup, which is inside the Constraintlayout, the root Linearlayout increases the height. In…
-
1
votes1
answer76
viewsAndroid - Detect specific word in an Edittext
How do I make it so that when a button is pressed, it activates a function only if a specific word has been typed at any position in an Edittext? Thank you. main.xml: <EditText…
-
1
votes1
answer348
viewsAndroid Studio error while passing array between Activity
I’m developing an app that reads the barcode of an item and compares whether or not it exists in a list with database data. When any of these items is not present in the database it should save the…
-
1
votes1
answer370
viewsCreate a pdf on android
I have a byte[] which is a pdf. use the following class to try to convert it. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);…
-
1
votes2
answers114
viewsIs it worth measuring performance between Java x Kotlin applications?
Going through the Google Developers documentation, I found something pretty cool like: Measure app performance with Android Profiler But knowing that Java and Kotlin are interpreted by the JVM, I…
-
1
votes1
answer133
viewsProblem with updating a Fragment
I am learning Android and while trying to develop an app I came across the following situation: I have an Activity that has two Fragments: ReminderListFragment and FilterListFragment. The first…
-
1
votes1
answer137
viewsHow to copy children from one node to another node - Android with Firebase
I have an X bank that contains categories of companies and I want you to enter the data manually in Categories, send a copy to Allempresas. I’m using this code but I’m not finding a way to just get…
-
1
votes0
answers695
viewsConvert a string with HTML Code into an HTML object(Tag)
good morning. I have the following problem: I am implementing the integration between the company’s mobile application and the VIMEO platform. I’m using the oEmbed type integration, and from their…
-
1
votes1
answer187
viewsClose a Dialog When you click the back button
I would like the open Dialog to be closed when I click on the return button of the mobile phone. I know that to close a dialog we use the Dismiss, but I don’t know how we declare the back button of…
-
1
votes1
answer51
viewsCounting records with Room and Livedata in android studio
How I call this function in viewmodel adapter: @Query("select * from PRODUTO") int getCountProdutos(); My viewmodel: public class ProdutoListViewModel extends AndroidViewModel { private final…
-
1
votes1
answer226
viewsWhat are Good Practices for Reading Firebase Data and Inserting into Activitys?
I’m getting Insert and Recover Firebase Data... But I I don’t know how to pass the information obtained for some Edittexts, Textviews in several classes.. Questions: What are the best practices for…
-
1
votes0
answers81
viewsCRUD Android doubts
Good afternoon I’m with 3 doubts regarding a crud I made in my app. 1 I did a field search and it seems that does not pick up any phone of the line J7 and I was wondering if someone can tell me why…
-
1
votes1
answer254
viewsCapture the radio button and save Text to the database
Guys I’m managing to capture the selected Radiobuton to save in the bank, I need to capture the radio button in 3 ways, these 2 radiobutons are in a Radiogrup, the radiobutton is the type. private…
androidasked 6 years, 6 months ago Romão Gomes 143 -
1
votes2
answers418
viewsAndroid - Scratch text on a Listview
I created an application of tasks to be done that are presented in a Listview. I am using Sqlite with a table with the columns: ID, task, completed. I want that when I go through the records, if the…
-
1
votes0
answers46
viewsProblem to sector setImageResource
Hello, I have a project to which I upload drawable images to a Listview, the problem is that when I run the project no seated images appear, someone can help me find the error? LAYOUT main_activity…
-
1
votes1
answer329
viewsError starting service on startup(ACTION_BOOT_COMPLETED)
I have a problem to start a service on android soon when the phone turns on I followed several tutorials but always causes this error 06-04 23:56:27.305…
-
1
votes0
answers39
viewsUsing ksoap (Android) to consume php WS (nusoap)
good morning! I’m in a little trouble: The ksoap library is returning me an error while trying to integrate with a nusoap webservice, I’m always getting null return, error: 06-07 08:53:23.843…
androidasked 6 years, 5 months ago Marcus Oliveira 17 -
1
votes1
answer50
viewsError when complilar app created in Android Studio
When inserting a ImageView, and try to run the app on the emulator, it displays the following message on the screen: **com.android.phone has stopped** , but that message disappears and it performs…
-
1
votes1
answer118
viewsKeep a Changed Textview even after closing the app
Guys I’m making an application for financial management, spending control for college, is my first experience with android studio and the java language, but I’m already evolving enough, I need to…
androidasked 6 years, 5 months ago Romão Gomes 143