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
answer81
viewsHow to create a Chronometer in a notification?
I have the following method below: public NotificationCompat.Builder createNotification(Context context) { Intent intent = new Intent(this, MapsActivity.class); PendingIntent pIntent =…
-
0
votes0
answers135
viewsHow to fill the entire screen in "Landscape" Table Layout mode?
I am using a "Tablelayout" in my application. This is my XML code: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"…
-
0
votes1
answer143
viewsAndroid & Firebase Async tasks
I have a class Java that I overwrote the method toString() within this method before returning I consult firebase and fill an object. My problem is the following return of toString() ends up being…
-
0
votes2
answers261
viewsProblem with animation in Android Studio
I created a Float Buttom to start an animation, but when I click on it, the animation does not occur. I have already done the debug to check the method that starts the animation and it occurs…
-
0
votes1
answer695
viewsHow to get more accuracy in GPS using google Location on android
In my project, I need to get a current user location and address and constantly update my position because of greater accuracy. The problem is that when I got the location (Latitude and Longitude),…
-
0
votes0
answers134
viewsHow do I use Fileprovider and Bitmap together?
I’m having trouble sending a photo to the server, specifically in the excerpt: "bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);". Always when taking the photo it shows error in this line.…
-
0
votes1
answer559
viewsSet value in textview
Basically I’m not getting to set the value in the field. I’m doing so, I declared the variables: Restaurante restaurante; @ViewById TextView nmRestaurante; @ViewById ImageView imgLogoRestaurante;…
androidasked 7 years, 5 months ago Renan Rodrigues 3,709 -
0
votes1
answer1207
views(Android Studio) Odd or even
I’m a beginner in Android Studio and I need to make an app that gets a number in Edittext and then tell me if it is even or odd, follow my current code : I don’t know what and where to put to when…
-
0
votes1
answer31
viewsPop-up menu does not check radio Buttons
Menu: <?xml version="1.0" encoding="utf-8"?> <menu xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android"> <group…
androidasked 7 years, 5 months ago Juliano Souza 155 -
0
votes0
answers67
viewsHow to maintain a radiobutton marking when scrolling a listview?
Good afternoon, I have an edited listview and inside it I own a radioGroup. I need that when scrolling the listview, the marking on the radioGroup does not lose its marking. Follows the xml.…
-
0
votes1
answer159
views(Android Studio) Problems with Onrestart eating the main interface
Instead of the app showing the interface below, it pulls the Onrestart method directly and displays "Program restarted" when I open the app. How do I fix it ? Code : TextView tInforme; EditText…
-
0
votes1
answer56
viewsSpinner returning Null and Void
My spinner is returning null, probably at the time of passing to the string there is something wrong and there is an error in these lines :…
-
0
votes1
answer131
viewsReturn Spinner Value For String
I need to return the value of a spinner , to make a post , but the spinner is returning null ! catliv = (Spinner) findViewById(R.id.catergorialiv); List<String> list = new…
-
0
votes0
answers120
viewsSearchview with MVP
Studying the MVP standard, I refactored an activity that lists the product data, just a simple list more that I do the data filtering, the information comes from the internal database and the…
-
0
votes1
answer11327
viewsGet permission to write to SD card on Android 6+
I’m creating an app that reads and writes files on Android, it turns out I can’t get permission to record on the device’s external storage. After researching I saw that I need to call this screen to…
-
0
votes1
answer34
viewsProblem opening a new Activity
I’m having trouble trying to change Activity, Just not opening my new Activity. public void Add(View v){ try { FormularioActivity.choise = 0; startActivity(new Intent(RolavelMainActivity.this,…
-
0
votes1
answer1002
viewsUnable to start Activity Componentinfo{}: java.lang.Nullpointerexception
I’m having difficulty finding the solution to this problem, in the code I want to go from Activity "Mainactivity" to "Plantalist", but when testing the application in the virtual machine the app…
-
0
votes2
answers245
viewsError using a Static final String to build an SQL query
Good evening person, I’ve been searching around and I know that you can do CRUD organized... I know that the programmer creates a class with the strings, leaving for example public static final…
-
0
votes1
answer417
viewsCalling a method of the class of the Fragment itself
Good afternoon, I have a Fragment that has the following XML <Button android:id="@+id/salvar" android:layout_width="match_parent" android:layout_height="wrap_content"…
-
0
votes0
answers104
viewsGdx Audio Infinite Sound Error
I’m creating a didactic game and when the bird collides with some object the sound happens but is endlessly repeating it, I can’t stop. public class Flappybird extends Applicationadapter { private…
-
0
votes1
answer49
viewsHow to display a result list in an Activity?
I have a very limited knowledge in programming and am starting Android now. I started developing an Android project for physical therapy. In this project, physical therapists can register and log in…
-
0
votes2
answers3232
viewsClient-server connection via socket
I need to make a connection via socket as follows: My Android app has a "Confirm" button - when you click the button it has to send a message to the server and after that the server has to return a…
-
0
votes1
answer385
viewsError while performing an SQLITE table creation
I’m trying the following mistake: android.database.sqlite.SQLiteException: no such column: np (code 1): , while compiling: SELECT _id, nome, email, np, tipoFunc FROM usuarios ORDER BY nome ASC at…
android android-studio sqlite android-fragment sqlite-studioasked 7 years, 5 months ago Lucas Charles 127 -
0
votes1
answer184
viewsHow to pass the received data from an activity and put it into a recyclerview
Hello, I’m beginner in java programming and I’m having trouble passing some serialized information from an activity to a recyclerview. When the second activity is started it brings no information.…
-
0
votes1
answer68
viewsProblems with the instantiation of the chronometer
Good afternoon guys, in my application I am creating a "simple" chronometer but I’m having trouble running application. I created a class that contains two methods one of start and the other of…
-
0
votes1
answer45
viewsApplication giving Crash on a button inside a custom Alertdialog
I am working with Alert Dialogs and I appeared an error where the application stops responding. The following code refers to a fragment where you are using the Google Maps API, and means that when I…
java android android-fragment listener alertdialogasked 7 years, 5 months ago Guilherme Vinicius 55 -
0
votes1
answer51
viewsLocation reset in Android Maps API
My code creates a route between two points on the map at the coordinates I am trying to pass from the coordinate of my current location to fromPosition, using the low code. But he’s giving 0.0 on…
androidasked 7 years, 5 months ago raio mobile 1 -
0
votes1
answer33
viewsError while editing through SQLITE
I’m trying to edit information that’s saved in the SQLITE gang. I’m working with fragments. But I’m making the following mistake: FATAL EXCEPTION: main Process:…
-
0
votes2
answers143
viewsIt is possible to open Activity inside framelayout
Is it possible to "inflate" an Activity ( in this Activity has a recicleview) inside a framelayout ? if not, what I use to open 3 different activitys, keeping the navigation bar down as in…
-
0
votes1
answer48
viewsExchange of information with Fragments
I have a CRUD to add users but I’m having trouble implementing the edit. User clicking edit wanted edittext to be loaded already filled. For that, I tried to implement something like: ImageView…
-
0
votes1
answer547
viewsScreen login SQLITE
I am trying to perform the verification of user existence and login when performing the access in the system. I’m using the following codes: public int login(String username,String password) {…
-
0
votes0
answers148
viewsCould someone explain to me why this null Pointer Exception?
Logcat java.lang.Nullpointerexception: Attempt to invoke virtual method 'android.text.Editable android.widget.Edittext.gettext()' on a null Object Reference at…
-
0
votes1
answer66
viewsError using Mainactivity method in Fragment
I am trying to use a method that returns a list, when using this same method inside the mainactivity where it was created everything works well, but when trying to access it in a fragment of the…
-
0
votes1
answer3991
viewsRecyclerview No Adapter Attached; Skipping layout
My app was closing at start, I was recommended to pass all code ( creation of the Recycle view ) to the onActivityCreated from Fragment, I did this, the app works, but it should load the recycleview…
-
0
votes1
answer537
viewsRecycleradapter with different layouts
I would like to know how to use a different layout with the scheme below, If I am in Activity A showing Layout 1, if I am in Activity B show Layout 2, I saw that it is done with viewType , but I…
-
0
votes1
answer62
viewsfindViewById returns null
I am receiving null from my findViewById call, and I cannot understand why. The code below relates to a Activity in my program: @Override protected void onCreate(Bundle savedInstanceState) {…
-
0
votes1
answer631
viewsReturn string in SQLITE query
I need to return a user’s name in an SQLITE query: I’m using the following code: public String verificarUsuario(String login) { try { String selectQuery = "select nome from usuarios where login = "…
-
0
votes0
answers185
viewsNotification Android does not work
I followed the example given here of stackoverflow, Notifications in a given time and on mobile phone but only the service is started, the notification is not launched. Follow my code here, how I…
-
0
votes1
answer412
viewsRetrieve past information in a Bundle
I have a Fragment that calls another Fragment by passing login information to the other. I do this with the following code through the Bundle. Follow the code : ImageView editarBt = (ImageView)…
-
0
votes1
answer133
viewsList in Android Studio
I have a listview that brings data when I add it to mine ArrayAdapter. For example: adaptador.add("algum dado"). But I wanted this listview to bring data from a register of products, such as the…
-
0
votes1
answer510
viewsSort by date and name Arrayadapter
I am using "Comparator" to sort my listview. Sort only 1 element, it is working, but with two the same does not work. //ordenar por data arrayAdapter.sort(new Comparator<Vagas>() { @Override…
-
0
votes0
answers112
viewsOverlay items in Listview
Good morning! I have an app android implemented in c#. This application displays a "list view" with the products. Each product has information that can be viewed by clicking on the "V" button and…
-
0
votes1
answer1635
viewsPassword Validation Android Studio
On one screen I register the password (sign up button) and on the other screen I need it to be validated for the application to turn off (turn off button). I have tried several ways, but I can not…
-
0
votes1
answer540
viewsMobile Player Problem - webview app
I created an app on webView and its player only works when we press the play button 3 times ( one to play the video, then pause and then press again it plays the video ) the app link to demonstrate…
-
0
votes0
answers302
viewschange view of an Activity from another class
I’m making an audio recording app and my Mediarecorder instance starts running from a service, so it runs even in the background, now I want to implement a timer to mark and save the recorded time,…
androidasked 7 years, 4 months ago Davi Resio 187 -
0
votes0
answers26
viewsCreating Responsiveness with Types of Densities
I have some huge curiosities in the following question: For each type of Density we created types of folders, as an example: drawable-xxhdpi - [Imagery] layout-xxhdpi - [XML] values-xxhdpi -…
-
0
votes0
answers328
viewsCampo dinamico Android
<RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:id="@+id/relativeLayoutPacient" > <TextView…
-
0
votes1
answer735
viewsBack button on webview
I’m starting in the area of android app development. So I started to develop an application which I created 4 layouts ( Main screen, central subscriber, contact and plans). In the subscriber’s…
-
0
votes1
answer391
viewsSet Floatingactionbutton size on Android
private FloatingActionButton createButton(int id) { FloatingActionButton fab = new FloatingActionButton(this); fab.setId(id); fab.setOnClickListener(new View.OnClickListener() { @Override public…
-
0
votes1
answer176
viewsPersist data from Storage Firebase
Good guys I started working with firebase Torage, I was able to send and receive data from firebase normally using documentation. However I would like the photo that the user sent and received was…