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
answer452
viewsScrollview with Relativelayout
How do I make for the RelativeLayout occupy the entire height of the screen inside the ScrollView? (tried wrap_contet but as I have advertised Admob she gives error with the button) Code: <?xml…
-
0
votes0
answers589
viewsHow to pass data from Activity to Fragment
I’ve seen some posts about but I couldn’t figure out how to pass a string from one activity for a fragment I got the main: public class MainActivity extends AppCompatActivity implements…
-
0
votes0
answers35
viewsProblem in the Fragment
I have a class that uses fragment, but I’m having trouble calling one of these activity. When I do it for my own App. I want to click on the fragment MsgFragment. Below follows the main class and…
-
0
votes0
answers108
viewsError when using error error method in edittext()
I made a simple validation in my form, but when I try to apply an error in Textinputedittext the app closes, I always used so, I do not understand why it is not working. Logcat: FATAL EXCEPTION:…
androidasked 6 years, 9 months ago Igor Oliveira 1,110 -
0
votes0
answers40
viewsWhy always on the sixth Imageview I put the App hangs
<ImageView android:id="@+id/lampiaoId" android:layout_width="54dp" android:layout_height="164dp" android:layout_marginStart="96dp" android:layout_marginTop="340dp"…
-
0
votes1
answer40
viewsSave togglebuttom state
Good afternoon! As I could save the state of a togglebuttom, I created an app where I save and delete an edittext, however I do not know how to save the state of that button, every time I left the…
androidasked 6 years, 9 months ago Thed Santana 53 -
0
votes1
answer46
viewsDisplay given arraylist, with click on given button
Hello, My xml has several buttons as I do so that when I click a certain button press an arraylist in listview example Botão1 clicado -> arraylist<Perguntas> carrega na listview1 Botão2…
-
0
votes1
answer78
viewsandroid:layout_height="fill_parent" from Viewpager does not work
I have a ViewPage that does not work the android:layout_height="fill_parent", shows nothing on the screen, but if I determine an ex value: android:layout_height="500dp" the determined height…
-
0
votes1
answer2636
viewsError executing: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
Does anyone know how to fix this mistake? I do not know the reason, my project was normal, but gave power outage and the pc turned off direct, after that I can no longer run it on mobile, this error…
androidasked 6 years, 9 months ago user98257 -
0
votes1
answer2562
viewsfindViewById(); with a variable within the method
Kind of: public void main(){ String a = "bt1"; Button bt1 = (Button) findViewById(R.id.a); } I know it doesn’t work, but it would be something like this, using a variable String.…
-
0
votes1
answer540
viewsApk Android - publication
I already made my code, uploaded it to Google Console and the APK is as draft. I made the instructions to turn the draft into publication through the version creation screen, complete the frames and…
androidasked 6 years, 9 months ago user4701 -
0
votes0
answers35
viewsHow do I check if the user has already logged in once?
When the user presses the "login with facebook" button for the first time, the application asks for permission and returns the "Gave" dialog, however if I login and try to login again error appears,…
-
0
votes2
answers332
viewsHow to show a call activity when the device is locked and turned off
I’m developing a Video and Voice app. What I need is to show an Activity the call request when one user tries to call another. I’m already using Firebase Cloud Message to push messages to the…
-
0
votes1
answer1220
viewsError:(1, 0) Plugin with id 'com.android.application' not found when doing project sync
apply plugin: 'com.android.application' android { compileSdkVersion 24 buildToolsVersion "24.0.0" defaultConfig { applicationId "app.teste" minSdkVersion 15 targetSdkVersion 24 versionCode 1…
-
0
votes0
answers303
viewsToken by Firebase
It is possible to generate token and send to some android device that requests to register in the application by Firebase Auth?
-
0
votes1
answer69
viewsHow to leave a hidden Seek bar until another button is clicked - Android
Hello. I have a silly question, but I will be very grateful to those who help me! I am making an app in which in an Activity I have an image view, several Uttons and a seekbar. The idea is this, I…
androidasked 6 years, 9 months ago Claudio Humberto 1 -
0
votes1
answer157
viewsAPK validation at Google
I have a app I need to validate the integrity of the data. For this, I need the google Tell me if that app was signed by him or not. But for this to work, I need him to run me a token for…
-
0
votes1
answer39
viewsMake calls through an icon on the website by the webwiew of the app
How to make phone calls within webView. on the site has the link from the phone dial inside. Ex: when I open the site by the webview app I created it does not call the dial function from the phone.…
androidasked 6 years, 9 months ago Arley Gonçalves 1 -
0
votes1
answer27
viewsAssign an element [name] of the database that is in a list to an Edittext
nome = (EditText) findViewById(R.id.edt_nomecli); listaclientes.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView,…
androidasked 6 years, 9 months ago Amanda Maturano 1 -
0
votes1
answer79
viewsStart an Activity from an item in the bottom navigation (menu bar)
I have the Activity main and a bottom bar navigation with 4 items. When I start the application, it starts, shows the Activity of the first item. I wanted to make it "start" from item 3. Is it…
-
0
votes2
answers177
viewsError using Radiobutton gettext() method
I created a very simple app to calculate an account with extra tip where I enter a value, select a Radio Button with a percentage and it generates the final value as a result. But every time I click…
-
0
votes0
answers641
viewsHide the APP icon
Good afternoon, you guys. I need to create a service type APP, no icon or any trace of it running. I’ve managed to hide everything I need and everything works fine. However, I am using…
-
0
votes1
answer1050
viewsAdjust image inside button
Does anyone know how to adjust the image to the size of the button without it being cropped? Button: <Button android:id="@+id/funcionario" android:layout_width="fill_parent"…
-
0
votes1
answer116
viewsDoubt about how to use a screen to measure temperature by cell phone
make me a question, I have to add a function to measure the temperature of the environment by the smartphone in my android app, but I have no idea how to do this, e nem sei se tem como... Could…
androidasked 6 years, 9 months ago Alexwell Souza 47 -
0
votes1
answer72
viewsError while performing android route : Androidhttpclient: Leak found
Guys I’m making the following mistake : 08-24 22:52:53.529 9872-9880/br.com.anjodarua E/AndroidHttpClient: Leak found java.lang.IllegalStateException: AndroidHttpClient created and never closed at…
-
0
votes0
answers93
viewsrecover data from a Firebase Node
Glr, I want to retrieve a data in Firebase that is inside a Ode. Can someone give me a Light ? Note: This topic already exists and I have seen a solution, but the author of the answer describes a…
-
0
votes0
answers55
viewsUser-to-user notification in different apps
I was doing some studies related to the development of Android, and I came across the following question. How can I send a notification from one user in an application to another in another…
-
0
votes1
answer133
viewsError: Runtimeexception when trying to mount test case
I’m trying to set up a simple test using espresso and the following errors appear: Code: import android.content.Context; import android.os.Bundle; import android.support.annotation.Nullable; import…
-
0
votes1
answer211
viewspublishProgress() updates onProgressUpdate() only at the end of theInBackground()
I have an app that updates the progress bar, the same way I’m doing in another app, but in this new app, the onProgressUpdate() only executes at the end of doInBackground(). It is called the method…
-
0
votes3
answers1664
viewsString Format CPF on Android
I have a CPF variable that is populated with a value that comes from the database (11122233344). Before giving setText(), I need it to be formatted in 111.222.333-44. How could I do this?…
-
0
votes0
answers77
viewsWhen trying to get the user id saved in sharedPreferences, sometimes it returns null
When logging into the app, I save your data to Sharedpreferences using GSON (to save the API response with id, name, email, etc). The problem is that when starting the app, I check if the Model User…
-
0
votes1
answer38
viewsIt is possible to request a specific file for the user
I want to get a special file from the user. It has how to put the name of this file as type in Intent? For an image for example, use: Intent intent = new Intent(Intent.ACTION_PICK)…
-
0
votes1
answer210
viewsHow to change the location of the database
I’m creating a database like the SqlOpenHelper and I know that it saves the database in the folder date. I was wondering if there’s a way to move the location of the database to the sdcard for…
-
0
votes1
answer172
viewsHow to Identify Carcter
I have a class who catches a String and look at the first character and if the character is empty (" ") it returns me the first letter. public String textReturn(String x){ int v1 = 0,v2 = 1; String…
-
0
votes0
answers49
viewsURL with characters in Webview Android
I have to display a page on an android webview using a URL returned by the server. The problem is at the end of the URL where there are two dots (..) but when I pass the string to the webview these…
-
0
votes0
answers78
viewsWould it be possible to send pre-programmed messages via messaging apps?
I am making an application in Androidstudio/Java that needs to send messages constantly, consists of a trade quality evaluation program, which when evaluated as bad will be sent an sms to a specific…
-
0
votes0
answers30
viewsHow to make layouts for different device resolutions?
Good guys, I wonder how I do to create layouts for different screen sizes (small, normal, large or xlarge) in the same project in Android Studio? I do the layouts in the same directory: "layout" or…
-
0
votes1
answer424
viewsUsing executor on android
I’m trying to use an executor to record data in the database using threads. When instantiating an object from the Executor Service class and retrieving an instance from…
-
0
votes1
answer542
viewsListview with dynamic height(without scroll)
Considering the following structure: Listview (1) > Adapter (1) > Listview (2) > Adapter (2) I need to place a listview inside an Adapter, and in that list view there may be several other…
-
0
votes1
answer64
viewsCheck if it is the correct Fragment after the click (UI Test)
I would like a tip on how to check if it is the correct Fragment after the click Follow the thought (Wrong) for example, someone has an example of how I can test this? @RunWith(AndroidJUnit4.class)…
-
0
votes1
answer532
viewsAndroid - How to finish/finish an Activity?
How to close, finish, finish a Activity, after executing a method? In my project, I have two Activitys: Mainactivity (Home, Home screen) Editoractivity (Performs some simple tasks) I would like to…
-
0
votes1
answer1848
viewsWhat’s the best way to present only two houses in a java float
I am creating a simple application in android studio, where I make a division and present its result in an Edittext, however I would like to present only two decimal places, which is the best way to…
-
0
votes1
answer103
viewsVárias Textview
I was wondering if there’s any way I can add a Textview to a layout in java. type I have an xml that has a Textview and in class Activity I use setContentView() to link the two, but I wanted to put…
-
0
votes1
answer59
viewsWhat is the utility of using Basecolumns. _ID to define a contract class in Sqlite?
Why should I wear Basecolumns. _ID instead of simply defining a string as _id ? For example, instead of using: public static final String _ID = BaseColumns._ID; Wouldn’t it be simpler to use this?…
-
0
votes1
answer77
viewsWhich method can I use to make a ticket layout?
I am in a parking project which requires the use of ticket generated through a bluetooth device. my question is how can I make this layout? which parameters and methods can I use?
-
0
votes1
answer185
viewsExpandablelistview - change background color of header title group
I need to change the background color of my Expandablelistview header group to a green color. Anyone have any ideas? Expandablelistadapter public class ExpandableListAdapter extends…
android android-layout android-fragment android-activity android-adapterasked 6 years, 9 months ago Wallace Baldenebre 114 -
0
votes0
answers285
viewserror: cannot find Symbol variable Toolbar and section_format
I’m learning to code for Android and created an app from scratch on an empty screen. Then, I decided to put my Activity in a model with tabs, where the first tab would be this screen I already made…
-
0
votes1
answer291
viewsHow to display message that the app is processing
I have a method that is exponential time complexity and it takes a while To process, thirty seconds on average. However, during this time, the app hangs and gives no sign of life. I wanted to show a…
androidasked 6 years, 9 months ago Lucas Resende 3 -
0
votes0
answers175
viewsAndroid Listview does not display the first item
First thank you for trying to help, come on! I own a project made in Android Studio where it contains a custom Listview that I used along with my INTERNAL database. After the project has evolved, I…
-
0
votes1
answer260
viewsHow to move textures using libGdx?
I made this example of code that draws a texture on the user screen: package com.example.myapp; import com.badlogic.gdx.*; import com.badlogic.gdx.graphics.*; import…