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
votes2
answers742
viewsUse of Android Camera
Good afternoon, guys, I’m new here, so I’m sorry if I’m asking you something I’ve already talked about. Next we have an app in the company already a while ago for sdk 7, what happens is that…
-
1
votes1
answer80
viewsAndroid Studio - Doubt about String’s comparisons
I have the following code static String q1 = "select * from faculdade"; if(edit.getText().toString().equals(q1)) { bar.setCurrentPosition(++position); Toast.makeText(getApplicationContext(), "Certa…
-
1
votes1
answer141
viewsAndroid Button below a fixed-size Viewpager
I’m creating a layout where I need a button below Viewpager, in this layout I also click tabs, as in the image below: What happens is that I can not leave this way without being fixing the size of…
android android-layout responsive-layoutasked 8 years, 3 months ago Renan Vinícius Quadros Barbosa 31 -
1
votes0
answers82
viewsSlowness in getting api response using Httpurlconnection
I have a critical problem, when I submit a request to the API, it always takes a long time to receive the reply, I am using gcm too, always arrives at the time the request is sent. But when the…
androidasked 8 years, 3 months ago Rubens Ventura 301 -
1
votes1
answer161
viewsSpinner - Line break in list
When opening the Spinner, has some options that are great, so by default he puts ".." points at the end of the item. Is there any opção padrão do Spinner for the automatic break or would have to be…
-
1
votes2
answers78
viewsHow to refer to a String through various values in Java (Android)?
I made a chatbot/virtual assistant and I want it to answer the same thing for different words, example: if I write "Hi" or write "Hello" it return the same answer: "Hello, how can I help". public…
-
1
votes2
answers351
viewsError returning Android Cursor
public boolean insertData( int id_item, String nome, int quantidade) { String preco_unitario = "0"; String id_pedido = "0"; SQLiteDatabase db = this.getWritableDatabase(); ContentValues…
-
1
votes1
answer146
views"Timeout Waiting for task." when trying to click on webview button with espresso android
I have a button on a mdl-card of an html page that is as follows: <div class="mdl-layout-spacer"></div> <a id="btn15-minutos" href="#/" class="mdl-button mdl-js-button…
-
1
votes0
answers348
viewsHow to open an Imageview in full screen using Onclicklistener?
I have an app and would like to display an image in full screen. The screenshot below shows an application example. How could I put it in full screen, using onClickListener? And how could I do the…
-
1
votes1
answer57
viewsListactivity error, probably related to Onitemclicklistener
I am having a problem understanding what is going wrong in this code, I feel that the problem may be related to Onitemclicklistener. When I try to emulate it responds with a message like this:…
-
1
votes1
answer86
viewsIt takes a long time to get results, even with Asynctask’s in parallel
I send a request to the server but it takes to receive the result, I realized that the Asynctask that sends the location to the server every 1 second is getting in the way. I realized this after I…
-
1
votes1
answer558
viewsList of all files that are within the Resource.Raw folder
How to get all the files that are in the Resource folder and move to a list. I am doing it manually, but now I need to take it dynamically and move to a list all the files that are in the…
-
1
votes1
answer61
viewsWhat is the difference between these two means of obtaining the Packagename?
I have these two code snippets, the two of them display the same result, so I’d like to know, what’s the difference between them. 1 jclass cls = (*env)->FindClass(env,…
-
1
votes1
answer315
viewsError inflating menu in navigation Drawer in Nougat and Oreo version
Hello, I have a problem with Android Navigationdrawer in versions 7 or higher. When I add the menu via xml, an Exception is generated. However, in the MARSHMALLOW version it works correctly. Follows…
-
1
votes0
answers25
viewsUsing the Xamarin Live Player
I can’t run Xamarin Live Player. The live screen After loading the live screen, scanned the qrcode and insert in editbox After all this, nothing happens…
-
1
votes1
answer42
viewsIs it better to repeat field or Join to access the relationship?
Hello, thinking about performance and also good practices, what would be the ideal in this scenario? 3 objects: - Enterprise - Person representing the company - Visit (object of a commercial visit…
-
1
votes1
answer1332
viewsDoubts regarding the use of the camera, via Intent
Good afternoon everyone, I started an internship a couple of months ago and both this community and the foreign Stack have been my best friends on this new journey. Currently I am developing an app…
-
1
votes1
answer70
viewsSqlite Android, 2 apps accessing a database
How do I make 2 applications use the same database? If I create the bank in an app the other one does not access this bank, then how to make this 2nd app access this same bank?
-
1
votes1
answer201
viewsToolbar with two different colors
How to make a Toolbar with two colors in half, going from one color to the other?…
-
1
votes1
answer583
viewsHow to switch between cameras (Front, Back)?
I’m making a native Android application using the device’s cameras. After I start the first Activity, calling the camera (Back), I created a button, with the function of switching between the…
-
1
votes2
answers794
viewsAccess the emulator’s Sqlite database (and other storage types)
I’m developing an app that uses SQLite, SharedPreferences, etc. On my device with access root i can access all this information with some app’s specific to it (which require root access), mainly the…
-
1
votes1
answer254
viewsAdd empty item at the end of Listview
I have a FloatingActionButton in the lower right corner of my screen and when it comes to the end of ListView, it sits on top of a button. I would like to add an empty item at the end of the…
-
1
votes2
answers144
viewsDistanceTo method (Select the nearest distance between markers)
This may be a difficult question, I have a method in my maps application that generates a distance between the user and the marker: this distance is measured and updated smoothly as long as there is…
-
1
votes1
answer107
viewsEDIT TEXT - ANDROID
I have 3 Edit Texts in my project, I have set the maximum d characters for each one, I would like to know how to do for when this reaches the maximum he gives focus to another. Ex: the first one has…
-
1
votes1
answer98
viewsHow to change the file menu that is being used in Android Menu Navigation Drawer?
I want to know if it is possible to change the menu file being used by Drawer navigation menu Example: When entering this if that is in blue, it must be selected to use another menu file in the…
-
1
votes1
answer1510
viewsHow to get your own location (Latlng) in Android Studio
I need to set my own location on my map to calculate the route from where I am to where I want to go. I can create a marker for the destination, but I do not know how to ask android my own location…
-
1
votes1
answer81
viewsDifference between android.content and android.support.v4.content
When I use Fragments or Asynctaskloader, two options for the same element appear: android.content and android.support.v4.content What’s the difference between the two? These are my project settings:…
-
1
votes1
answer281
viewsHow to convert Curl request to java (Android)
I hope to convert the example below into CURL for Json in Java/Android. The IUGU API accepts JSON or XML. I tried several examples on the internet, but to no avail. CURL: $ curl…
-
1
votes0
answers53
viewsIonic - build is giving error
when I’m building with the code: ionic cordova build --release android is making that mistake: What is the Solution ??…
-
1
votes1
answer753
viewsupload images + web service php
Good people, I’m a little behind on my CBT because I can’t upload the image. What I have hj worked and take the photo, save in the gang sqlite the path and latitude and longitude, however I have a…
-
1
votes0
answers41
viewsProblem calling Class Activitity
I have a class I intend to call another class through a click on one of the fragments, but it is not responding when calling the other Activity gives an error in the app and application to work. I…
-
1
votes1
answer260
viewssoftkeyboard pushing layout up
Hey, guys, I got a problem, and I can’t fix it in any way. already tried adjustpan, resize.. anyway.. I have a layout with recycleview and edittext and a few more views.. when I click in edittext…
-
1
votes1
answer480
viewsBrowse Jsonobject Android
How to go through an Object array in the way q I can get the data? {"number1":"value1", "number2":"value2", "number3":"value3"} for (int c = 0; c < jsonObject.length(); c++) { }…
androidasked 6 years, 9 months ago Anderson Scherdovski 85 -
1
votes1
answer173
viewsEnable and disable Android alarms via code
I am creating an application and in a certain part I will need the application to activate and deactivate alarms (from the phone itself). I searched the Internet, but I couldn’t find anything to…
-
1
votes1
answer266
viewsGet String from strings.xml file
I’m trying to get one back String of the archive strings.xml for this variable SQL_CID. <string name="insert_cid">" INTO `CID` (`COD_CID`, `NOME_CID`, `CODIGO_CID`) VALUES(1, 'CÓLERA DEVIDA A…
-
1
votes1
answer26
viewsSwipelayout java android error. When I put, gives application error!
I’m wrong in this code in my application for Android, gives error: package fabiohcnobre.hotelcolonialdosnobres; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import…
-
1
votes2
answers63
viewsConflict when using Gson + Facebook API
Talk guys, all right? Someone there has used the Gson library in the same project where the Facebook SDK was used? The problem happened when I used the Facebook SDK to allow logging into the…
-
1
votes1
answer106
viewsAssign a color to the added image with "android:drawableLeft"
I have a due case that I am using three images for each of my buttons, as shown below the images: ic_palette_black_36dp ic_palette_red_36dp ic_palette_blue_36dp Code: <Button…
-
1
votes2
answers275
viewsSplit a layout into 2 with different percentages
Wanted to know how I do to share one layout in 2 with 70/30 percentage. I’ve devised a way to divide, but that way is not optimized for all devices.…
-
1
votes1
answer41
viewsMonitor battery usage in the app itself
Have some way to put a feature in the app, so it shows how much it is spending on battery/power? That would be on himself, and preventing the person from going to that config of the device that…
androidasked 6 years, 9 months ago Wallace Baldenebre 114 -
1
votes1
answer107
viewsAsynctask with one or more methods
I would like to know the advantages and disadvantages of using an extended class of AsyncTask, which contains only one or more methods. Example: I create a AsyncTask for each background processing…
-
1
votes1
answer87
viewsHow do I change Activity after logging in with facebook?
After loginfacebook(Fragment) I would like to change from Activity, for example to register, as I do? public class Loginfacebook extends Fragment { private LoginButton loginButton; private…
-
1
votes2
answers2528
viewsFind Sqlite Database on Android
Next, I’m creating an application for Android, where I use a local Sqlite bank, never gave any kind of problem of registration or database query, so I never had to take the bank direct in the…
-
1
votes1
answer821
viewsConcatenate a @string and XML text
I have a string called "key" and wanted to add the sequential numbers next to it in some textviews , but I don’t know how to concatenate into XML. For example: android:text="@string/key" + "1"…
-
1
votes0
answers38
viewsScreen Introduction App
Ola would like a light of how I can be making a canvas with a tour of this example .…
androidasked 6 years, 8 months ago user3380333 33 -
1
votes1
answer464
viewsIcon rounded android studio
What is the difference between android:icon and android:icon rounded? Not having an icon rounded causes an application problem?
-
1
votes0
answers4495
viewsButton with rounded edge and shade using 9 patch
Good morning! I would like to put shadow on the images and buttons of my app and I am trying to use the features of the 9 patch. However it is not working very well, the png height I am using as…
-
1
votes1
answer72
viewsHow do I restart the app when it’s brought from the background?
I need my app to reboot whenever it’s brought from the OS background, so the user is forced to log in again. I tried to use the finishAffinity() in my onPause() of Activity, the problem is that this…
-
1
votes1
answer334
viewsTimer with the Chronometer
I’m developing an app and it uses the timer by clicking on play to start and pause it to pause, only when I click again on play he Zera, would have how to keep counting the time? java code: public…
-
1
votes1
answer75
viewsInsert or replace does not work
The command INSERT OR REPLACE INTO SYSVAL ( CDDEVICE, DTVALINI, DTVALFIM, SALDO, REALTIME, VALIDADO ) VALUES( '34322910071833580','31-08-2016', '31-08-2016','10','63714560','S') works smoothly on…