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
-
4
votes2
answers4120
viewsQuestion about reading txt files on Android?
On the basis of that question by stackoverflow in the reply is suggested this code try { AssetManager assetManager = getResources().getAssets(); InputStream inputStream =…
-
4
votes3
answers6177
viewsDate Mask in Edittext
How to put date mask on EditText android, so that stay dd/mm/aaaa ?
-
4
votes1
answer128
viewsExample Delphi scrollform is not working in version 10.2
I have an App (Android) developed in the version Delphi 10.1, where I used the examples of Scrollform (so that the layout moves together with the android virtual keyboard not to cover the edits),…
-
4
votes1
answer907
viewsIcon Color - Android Toolbar
How do I make the icon color, in API’s smaller than 21, also white? Na 21 works ok, but below as for example the 16, turns black. I did it that way: Toolbar <android.support.v7.widget.Toolbar…
-
4
votes1
answer1023
viewsLayout Rendering Error
I used the Android layout support, specifically the Login Layout. When was render appeared this error: Exception Raised During Rendering: String index out of range: 0 In details appeared:…
-
4
votes2
answers986
viewsWhat is the purpose of setTag and getTag methods in View?
In the TextView declared this way below, is used the 1 as definition the attribute android:tag. Look at: <TextView android:id="@+id/tvJonSnow" android:layout_width="wrap_content"…
-
4
votes1
answer244
viewsSet MIME-type of a file on Android
I need to dynamically figure out what the MIME-type of a file is. Initially, I only need to identify videos, but I intend to use this to identify HTML pages, photos, PDF etc.
-
4
votes2
answers151
viewsGPS still on after closing Activity
I’m using in my app, GPS and Google Direction. It’s working, but I noticed the following. After I return from Activity where you have the map, the GPS icon of the smartphone does not come out, it is…
-
4
votes2
answers2872
viewsClick on button effect
I wonder if it is possible, in a Button, to have that click effect, that is, it "sink" and "return to normal". Is that a property or should I use an Imagebutton with the images of this "effect"?…
-
4
votes2
answers1398
viewsJava to Kotlin conversion
One of the qualities cited about the Kotlin language is the creation of clean code, that is, code that is pleasant to read and that can accomplish its goal without curling. From what I saw, Android…
-
4
votes1
answer3305
viewsChange the icons from the Navigation Drawer menu
I would like to know how to exchange these icons: I found the screen, but when I click it does not show me the way to make the change but only colors in RGBA :…
androidasked 8 years, 6 months ago Artur Mafezzoli Júnior 441 -
4
votes1
answer421
viewsSend an SMS to one of the contacts
I have an app and at the end I wanted to send a msg to one of the user contacts about my application. var columnNumber = cursor.GetColumnIndex(ContactsContract.CommonDataKinds.Phone.Number);…
-
4
votes1
answer577
viewsjava.lang.Numberformatexception: Invalid double: ""
While running my app appears error: java.lang.NumberFormatException: Invalid double: "" I don’t know what to do. The error happens when I leave a blank value, for example, the app makes the sum of 2…
-
4
votes1
answer878
viewsAndroid Studio Installation: Path to JDK
A few weeks ago I installed Android Studio and was developing the project and "accidentally" I deleted some folders that I shouldn’t have (careless on my part). I couldn’t find solution to repair…
-
4
votes1
answer118
viewsError when implementing method to take photo by application
I am wanting to add the method of taking photos by the application only when running my application error: below is my form class code: Spinner option; Button btnSend; EditText Nome; EditText…
androidasked 8 years, 5 months ago Carlos Diego 683 -
4
votes3
answers2405
viewsIs it possible to export the source code of an Android Studio project? How?
I developed an application in Android Studio that is now available in Google Play. As it was a project that I used as my TCC theme, the university needs the PDF source code. How I extract the code…
-
4
votes1
answer382
viewsSize occupied on disk by a table in Sqlite
In Oracle, when we want to know how much a table occupies disk we can make a query to the dictionary dba_segments. SELECT segment_name, segment_type, bytes/1024/1024 MB FROM dba_segments WHERE…
-
4
votes1
answer377
viewsIs it possible to select all Edittext text when in focus?
I have a EditText and when I use: editText.requestFocus(); I’d like you to select the whole text, it’s possible?
-
4
votes1
answer2155
viewsRead values from a table in Sqlite
I am in need of a help in the following situation: I need to take the values of a column in the bank and write these values in a variable, and then this variable will randomly generate one of these…
-
4
votes0
answers72
viewsApply a Transform with perspective
I would like to make the selection by perspective in a imageview. Where I select the 4 corners of the image and cut, following this idea: I searched all day and found little thing, I found this link…
-
4
votes1
answer655
viewsHow to associate/open mp3 files in raw folder?
I’m in trouble with songs, whenever I add some music and I will run some error code, whenever I click on the music in the raw folder appears a text , in tutorials that I saw the person clicks on the…
-
4
votes5
answers12363
viewsOne component on top of the other
I’m in trouble that I do not think how to solve, I have an Activity as in the photo below, the problem is, that when I emulate the application, the Button and the textView go down the two colored…
-
4
votes1
answer102
viewsPicking Strings from other Activitys
How do I pick a String, or more, from another Activity, and then use it in another Activity, someone there can tell me?
-
4
votes2
answers2215
viewsChange Fragment by clicking on a button inside another Fragment
I have a button inside my Ragment that I want it to call another Ragment that is over the current one when it is clicked. follows the code of Fragment: @Override public View…
-
4
votes1
answer4841
viewsSHA-1 key problem in apk release and debug
I finally got a version alpha from my Android app and decided to send it to the Play Store for the first time. As I’ve never done this before( I’m new in the world of Android development), I read…
-
4
votes3
answers294
viewsTransform Set<Integer> into Set<String>
I need to store a Set<Integer> within a sharedpreferences, however it only accepts Set<String>, has how to make this conversion ? Set<Integer> checados = group.getCheckedIds();…
-
4
votes2
answers498
viewsBlocked installation when debugging app by Android Studio
When trying to debug or install an application I am developing, the following message appears on the device where the APK is being installed. Blocked installation. This app contains code created…
-
4
votes2
answers1854
viewsHow to receive data using Firebase
I made a small test app using Firebase. Everything works great when I leave the rules for anyone to have access to the database ".read":"true", ".write":"true" But when I added permissions in the…
-
4
votes2
answers322
viewsSearch simple data Sqlite
I want to return only two simple data in TextView using SQLite. I have a common "Products" table and another temporary table "Information" I use SUM() to add the column of the first table. Dbhelper:…
-
4
votes1
answer328
viewsApp restarts when it changes orientation (rotated)?
I made this in my app: onCreate: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ... instances: @Override protected void onSaveInstanceState(Bundle…
-
4
votes1
answer119
viewsError: in Builder cannot be Applied
I’m developing a simple calculator. I am checking if one of the fields is null open a Alertdialog, however I am with the error in Builder cannot be Applied, no this do Alertdialog.Builder. Can…
-
4
votes2
answers1428
viewsOpen a new Activity from within a Fragment
How do I exit the Fragment screen (extends Fragment) and go to a normal activity (extends AppCompatActivity)? Either way, even using a button, I can’t. It never works. public class Teste extends…
-
4
votes1
answer5031
viewsConversion of Website or PHP or HTML system to Android and iOS app
What is the best way to 'convert' a website or PHP or HTML system to a Android and iOS app ? I have a PHP Script with DB Mysql and HTML site , and I’ve heard that you can generate the version of the…
-
4
votes1
answer1410
viewsHow do I run an algorithm when the user stops touching the screen?
I would like, when the user presses the screen, to open a horizontal menu with 4 options where the option to which he drops his finger on top will be selected. The pressing event I already know.…
-
4
votes2
answers1950
viewsClose all the Activities
I own 3 activities: splash_screen MainActivity error_webview To Activity error_webview has two buttons, one to open the splash_screen and another to close (Exit), but wanted to click on "Exit" to…
-
4
votes1
answer379
viewsAndroid 6 problem with map.setMyLocationEnabled(true)
I have a problem with the Google Api 23+ specifically in the method mapa.setMyLocationEnabled(true); You need permission to run, and on android 6.0+, I can’t implement the new permissions method.…
android google-maps-android-api-2 android-permissionasked 8 years, 3 months ago Roger Casagrande 123 -
4
votes3
answers604
viewsHigh-box text button in Android API < 14
We see that at the launch of Android 5.0 Lolipop came Material Design that has indeed changed a lot on Android and along with this, the component of Dialogs which by default comes with the high text…
-
4
votes1
answer259
viewsproblem with vectors in android studio
I’m having trouble inserting vectors in android studio my project was created in api21 (5.0), I am testing on a 7.0 device and this is all ok , working perfectly, but an error occurred when running…
-
4
votes1
answer628
viewsHow to prevent a new instance of Activity from being created every Intent
In my application I have a BroadCastwho receives push notifications in background, that pushcurrently opens an Activity with the information of a request to be accepted, what happens is that if at…
-
4
votes1
answer79
viewsBasic HTTP authentication
I have a question about basic authentication. The problem is that I have a webservice with slim framework and would like only my application to access the routes I created without user or password.…
androidasked 6 years, 8 months ago Stênio Barroso de Moraes 312 -
4
votes1
answer61
viewsCheck if a "String Resource" is being used in the project
Situation When we do not use a variable in the file, the Eclipse has a feature that is to inform the developer by sending the following message: The value of the field Class.Clienteid is not used.…
-
4
votes1
answer153
viewsImages are repeating in Imageviews
I have 54 images need to show only 8, but have to have a random selection and can not repeat, I am programming on the platform of Android Studio. I use this code it works smoothly, shows the results…
-
4
votes1
answer564
viewsWhen should I use mipmaps?
After Google started adding Mipmaps I ended up not researching exactly why. Even with this addition, it does not prevent anything from using the Drawable as before. Before res/…
-
4
votes1
answer86
viewsError while Browsing Web Wervice
I am doing a query of customers in a web service, step the key to see what it returns me tells that I did not pass the key, what I may be doing wrong in the method? That’s the .xml of consultation…
-
4
votes1
answer306
viewsAdjust Alertdialog with Open Keyboard
I have the following problem I have a Alertdialog When the keyboard is opened, the dialog goes up, but part of the dialog is hidden.. it does not adjust the height as per keyboard XML dialog:…
-
4
votes1
answer303
viewsVariable that changes according to the button pressed
I have two different methods on two different buttons. the Method onE adding up 3 the variable and the Method onM that takes -1 variable. The problem is that when I put this variable to appear in…
-
4
votes1
answer88
viewsDoubt with scenes (Scene)
I’m starting to use scenes in my application, and I’m constantly having the same problem, but now I couldn’t solve. So I have 2 scenes, and in the onCreate I take my views, for example: editText =…
androidasked 8 years, 1 month ago hugofsousa 608 -
4
votes2
answers314
viewsNavigation Drawer customized and colorful
Hello, what I wanted to do was to be able to put colorful icons in the navigation, as I can do this? The images I have in my project are colorful but in navigation they only turn gray like this. I…
-
4
votes1
answer1039
viewsHow to change the color of the line below Edittext via xml
How to change the color of this line below Edittext via xml?…
-
4
votes1
answer382
viewsMethod to pause the countdown
Good evening, I did a countdown on my app with the play button so I could start the countdown.... only that I wanted to make a method of pausing time and when I clicked on the play button again it…