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
answer642
viewsError compiling Ionic - Android
all right? I’m having trouble compiling the APK by Ionic. I already removed Android Studio and downloaded again. But it did not work. If I try to compile by the terminal it from the error, but if I…
-
1
votes0
answers31
viewsHow to open external link outside the app?
My project simply opens the page of my blog, and there are several links from other sites with domain other than mine. I want that whenever the user clicks on one of these links, the same opens in…
-
1
votes1
answer790
viewsI can’t find solution for "java.lang.Nullpointerexception" Error - Android Studio
The following error appears: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Object.equals(java.lang.Object)' on a null object reference at…
-
1
votes0
answers833
viewsError consuming JSON: "json Parsing error value <!doctype of type java.lang.string cannot be converted to jsonobject"
I’m trying to consume a JSON in my application. I created a Splashscreen and in it I am trying to download the data from the file JSON and send to my Masteractivity, where, then, I’m going to build…
-
1
votes0
answers176
viewsHow to open a screen with navigation Drawer from a button?
I am developing my TCC and do not have much knowledge on Android yet, but following some tutorials I managed to build a basic app. But I’m not getting and I have no idea how to open a screen with…
-
1
votes2
answers566
viewsPassing information to another Activity
Good morning I’m trying to pass 2 data from one Active to another but I’m not getting below the relevant code in the first Activity : @Override public void onActivityResult(int requestCode, int…
androidasked 7 years ago Diego Dias Mól 41 -
1
votes1
answer96
viewsRandom numbers repeating themselves
Well guys, here’s the thing: I have a method that generates random numbers, and in Activity I try not to repeat these numbers, but it happens that they repeat themselves. What I’m doing wrong?…
-
1
votes1
answer185
viewsHow to create a split between views?
I’m creating an app that uses a ListView to show items and wanted to know the best and most customized way to create splitters between them, also wanted to know how to use another splitter between…
-
1
votes0
answers65
viewsInserting bank value in Expandablelistview via hasmap
I’m having trouble inserting values in Expandablelistview from Android Sqlite database. In my app, I have a main table called DISCIPLINES and another table that has foreign key reference to this…
-
1
votes0
answers102
viewsHelp with sql search and android studio
I made this layout <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"…
-
1
votes2
answers1441
viewsHow to call a method of a Fragment in an Activity?
I need to use a Fragment method within an Activity, but I can’t pass a reference to that Activity. Can anyone help me? That’s the whole idea: public class MinhaFragment extends Fragment{ ...…
-
1
votes1
answer200
viewsListview in another Activity
I have a Listview in my activity main when I click a button, it adds data to my Listview, so far everything is correct. How do I show this listview in another activity? I show other data (EditText)…
-
1
votes1
answer43
viewsWhen to use void Inject on Dagger
Dagger, can someone give me a hand? I managed to do some 3 very simple projects always trying several to have new problems and learn more, but one part I’m kind of copying because I don’t…
-
1
votes1
answer295
viewsnon Static method write cannot be referenced from a Static context
I’m a beginner in android and in programming overall, I was following a classroom video to record a string in a txt file, when I came across the following error: Error:(49, 31) error: non-static…
-
1
votes2
answers106
viewsImage inside a Scrollview is blank on one device but usually appears on another
I have a Alertdialog whose content is a Scrollview with an image and a button inside. Scrollview works (I can "scroll" the bar), but the image does not appear (it is empty), although the button…
-
1
votes1
answer345
viewsIs Hashmap possible with various values?
I need to fill a bank like this: Milk 50 kcal 20 proteins 120 Carbo etc. I got to do with hashmap, but I can only use one key for a value, it would have to do with various values, or another way…
-
1
votes1
answer52
viewsSqlite Database is not entering values
I am creating a simple application that involves the Sqlite database and throughout the development my insert function in the table has stopped working. Through the debug I could notice that it is…
-
1
votes0
answers54
viewsHow to change a value in another class?
I’m trying to change the value of a variable in another class but I’m not getting it. package com.cursoandroid.firebaseapp.novotestebanco; public class Logado { public String situacao; Logado(String…
-
1
votes1
answer132
viewsHow to create a button for each Listview item that accesses a song
I wanted every item of the ListView played a song by clicking the button referring to each item, but when I click the button, it even plays, only q only the first song, the other songs in the list…
-
1
votes1
answer40
viewsHow to limit Firebase Storage downloads to a certain maximum amount per user time period?
I would like to know how I can limit the download demand on my app,20 per hour... obs. use firebase , no login, the only way I recognize a user and with id de anúncio do google the application only…
-
1
votes1
answer24
viewsmaxLine already set but jumps line
I know if using the native Textview android and set the android:maxLines="1" it does not let the user skip line. But I’m using Textviews from <com.rengwuxian.materialedittext.MaterialEditText:…
androidasked 6 years, 12 months ago Artur Mafezzoli Júnior 441 -
1
votes1
answer31
viewsAuto-increment in Android components
Good people, I have the following code: if (bolaPreta == 1) { img1.setImageResource(R.drawable.icon_circpreto); } if (bolaPreta == 2) { img1.setImageResource(R.drawable.icon_circpreto);…
-
1
votes0
answers36
viewsSave 2 templates to same firebase id
I have 2 models , the courier and the vehicle , I need to save the data of the two models in the same id of database, I did it this way, I used the vehicle. salvarDados(); but did not save: private…
-
1
votes0
answers390
viewsError while running project in android studio
While running my project the following error appeared: Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process…
-
1
votes1
answer8201
viewsError React-Native run-android
I installed the React-Native-cli, android sdk and the emulator of android. I managed to do the init but when I run the command React-Native run-android it shows the log: Scanning 577 folders for…
-
1
votes0
answers289
viewsError building: Timed out while Waiting for slave aapt process
I’d like to know how I can make that mistake when I try to create a new app. The error is as follows: it loads everything right, but when it will load the Gradle it gives error and the screen is…
-
1
votes0
answers69
viewsWorking layout on Android
Only I am having difficulties to format the layout screens in Android Studio after version 3.0.0 or I am no longer knowing how to do? My screens are mostly a Scrollview. To access the objects at the…
-
1
votes2
answers238
viewsAndroid Studio and Google Maps API - Change Travel Mode
Hello guys, beauty? So, I’m developing an application using Android Studio and Google Maps API. So I came across a question that until then I couldn’t find anything that could solve my problem.…
-
1
votes0
answers474
viewsChange the size of Navigationview icons
I can not increase the size of these icons... I spent a whole day researching everything on the net... book at home tbem and I would like to know if you have possibility to change the same... if you…
androidasked 6 years, 11 months ago Thales Monteiro 11 -
1
votes2
answers41
viewsReturn Updated Android Date Time
I made a class called Current Date containing this data: package com.projeto.projetov1.model; import java.text.SimpleDateFormat; public class DataHoraAtual { long date = System.currentTimeMillis();…
-
1
votes0
answers1737
viewsWhat is the correct way to interrupt a thread in Delphi
I am creating a thread with the basic information and structure as indicated below. Apparently everything is working well, but I noticed that when executing the Terminate, thread does not pass…
-
1
votes1
answer67
viewsAdd admob after a Listview in a Relativelayout
Goodnight! I’m trying to add an admob to the end of a Listview in a Relativelayout and the banner doesn’t appear at all! I’ve tried several different ways in the layout to see if Listview wasn’t…
-
1
votes0
answers282
viewsHow to have a searchview of material design?
I need to have a Toolbar with the menu items inside, search icon and voice. Like the one in the picture: I have the code to Activity override fun onCreateOptionsMenu(menu: Menu): Boolean {…
-
1
votes1
answer1014
viewsPosition button at the bottom of the layout
I would like to position the Exit button at the end of my layout. I am using Linearlayout. Some hint on how to position ? This is the Linear Layout code: <LinearLayout…
-
1
votes1
answer88
viewsTake data from a column in Mysql via POST and put into a Textview
How can I take data from a column and put it in a Textview? ? I tried this way: private static final String REGISTER_URL="http://localhost/teste.php"; private void register(String nome){ String…
-
1
votes2
answers528
viewsWorking with custom alertdialog layout
I created this layout, so I could work with this alertdialog. I created it, because I have to record the states after the click and also, when opening the dialog, I can get the value that was marked…
-
1
votes1
answer376
viewsKotlin error does not find bytecode for lambda Function: "Failed to find byte code for java/util/Function/Biconsumer"
When I try to run my app on mobile (emulator happens the same), the following error occurs: Error:FAILURE: Build failed with an exception. * What went wrong: Execution failed for task…
-
1
votes0
answers257
viewsSearchview error layout
Every time I click to search the search pushes tabs down I would like the tabs to stay fixed and the searchview to expand without pushing the tabs. <?xml version="1.0" encoding="utf-8"?>…
-
1
votes0
answers38
viewsEven include with button on different viewpager screens
I have a include with a button, and I use it has 2 screens, inside a viewPager, it happens that when I do the click system, it clicks the include of the last screen, and not the screen I clicked.…
androidasked 6 years, 10 months ago Igor Oliveira 1,110 -
1
votes1
answer499
viewsError saving JPEG image in database as string (Base64)
I’m developing an app that has a form where the user can attach a photo to the form. However I am having difficulty implementing this. In my APK I already capture the image, convert to base 64 and…
-
1
votes1
answer171
viewsError while creating android studio Fragment
I’m doing an android course that has navigation in bars and for this is used Ragments, I did the video way however tabs appear but the content of Ragments no, in the console I have this error:…
-
1
votes1
answer1542
viewsjava.lang.Securityexception: Permission Denial: Tarting Intent
I’m developing an Android phone call app. Give me the following exception: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.CALL dat=tel:xxxxxxxxx…
-
1
votes0
answers97
viewsI can’t call an Activity through a Fragment
First of all lose by mistakes (keyboard bugle). Well I’m trying to call an Activity through the code below, this code is in my Mainactivity.java. I created the Fragments to be called through the…
androidasked 6 years, 10 months ago Rafael Dias 11 -
1
votes1
answer944
viewsPick up product prices in an array, add them up and present the total sum in a Textview
Hello, guys, so, I’m having a hard time solving a problem here, I’m using a Multiautocompletetextview to pick up products and their prices in the app’s Firebase database, however, I would like to…
-
1
votes1
answer51
viewsError creating Poup menu in cardview
I’m creating an application that I use cardview in my list. And I’m having difficulty adding the menu in cardview, as image below: My class of cardview: class CustomAdapter extends BaseAdapter{…
-
1
votes1
answer280
viewsGrab hidden extension from Uri
I have an app to watch and download videos online, my code detects mimetype by the url to use as the video extension downloaded. But some sites have the hidden extension, such as this url:…
-
1
votes0
answers131
viewsHow to add markers to my map dynamically?
Good guys, I’m developing a mobile application in AS, and I’m using the map to add markers of each location of a new registered form, IE, when performing a registration I send along my latitude and…
-
1
votes0
answers39
viewsExpress Test on Android returns null to mActivityRule.getActivity(). getWindowManager()
I get an error when I try to access the property of Activity mActivityRule.getActivity(). getWindowManager(). getDefaultDisplay(); I tried to change Intentstestrule instead of Activitytestrule and…
-
1
votes0
answers77
viewsAndroid app closes when performing calculation
I’m making an app that has a very specific medical calculator. In AVD, the calculation appears divinely well. On real devices, gives error and the application is closed. Somebody help me out there?…
-
1
votes0
answers490
viewsList data from an API on android
Hello, I’m trying to list data from a web API, as I’ve never listed this way I’m finding problems to understand the solution of the listing, the API Url returns some values I want to list them in…