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
-
3
votes3
answers2785
viewsHow to have a full-screen Webview?
My specific question: How to open a WebView in full screen at Android Studio? Change Theme in Manifest? Change Theme in XML? Force a JAVA script? Change view margins? Change code in Style? All these…
-
3
votes2
answers1212
viewsManipulating an Object class
I have the following very complex situation (at least for me). I have a class Person (The data are fictitious for better understanding, but the idea is the same) like this: public class Pessoa {…
-
3
votes2
answers1280
viewsRecyclerview Error: No layout manager Attached
I couldn’t find the mistake. my Activity: private AdapterPacientes adapterPacientes; private static MVP.Presenter presenter; @Override protected void onCreate(Bundle savedInstanceState) {…
-
3
votes1
answer95
viewsUnused images in android studio project are included in APK?
Normally I’m not satisfied with the first image I put up as background, is from Activity, textView, button, etc. Even imageViews at last. It happens that I leave them there in the project, even not…
-
3
votes1
answer175
viewsAlertdialog Android "comment" Popupmenu
How do I get this result the 3 dots on this image have already been pressed. My layout <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"…
-
3
votes1
answer100
viewsSimple login Firebase
I already have a main login with Firebase auth. But I need to implement another login within that system, because the client can add other administrators. The login will be simple even, just check…
-
3
votes0
answers2186
viewsCreating background services in Ionic with Cordova or java
I have an application that I started to do with Ionic. A priori will be compiled only for android. In this application the user will perform some registrations, which will be saved locally and every…
-
3
votes1
answer1958
viewsWhat is the real difference between a button and an imageButton?
The image I used to do the tests is a simple gear of dimensions 100x100 with transparent background. At first I noticed that differently from the Button, by creating a Imagebutton you are bound to…
-
3
votes2
answers173
viewsCreate a Resource string or a class of counters?
I have an application where I use data persistence with SharedPreference. From the beginning when I started creating applications, I always created a class, for example, with name Consts to store…
-
3
votes1
answer98
viewsHow to execute requests in order?
I make 3 requests in a row, but they are fired in processing order, not synchronously, how can I resolve this? ... //botão pressionado // primeira requisição ivUpload.setOnClickListener(new…
-
3
votes1
answer487
viewsFragment is not overriding the marked layout
I’m working on a college project and I’m having a hard time replacing a given layout by a fragment. What is happening is that, the fragment is not replacing the layout of Activity but yes, mixing…
-
3
votes1
answer44
viewsHow to reverse the animation of an Animated-vector?
I am using the following Animated-vector: <animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"> <aapt:attr…
-
3
votes1
answer4234
viewsretrofit - How to send a JSON via POST
Talk guys, I’m using Retrofit 2 and I’m not getting JSON to WS. I have here my class that tidies up the json the way I need it: Customgsonadapter public class CustomGsonAdapter { public static class…
-
3
votes0
answers291
viewsFacebook login with Ionic
I’m trying to develop an application with Ionic that integrates with facebook, however I’m having some problems. I have seen similar discussions but no answer or solution. The problem is this: I…
-
3
votes0
answers57
viewsHow can I save images through url before displaying them using Fresco?
I loop the list with the images as follows: for( Produto p : listProd){ String error = ""; cont++; try{ // salvando dados no db produtoRepository.insertProduto(p); // salvar imagem p.getImg();…
-
3
votes2
answers182
viewsHow to create a Layout bitmap keeping the dimensions equal regardless of the screen density?
I have a layout file and I’m passing it to a bitmap which I then send to a printer bluetooth in bytes. According to the resolution of the cell phone, it changes the sizes of the sources of textviews…
-
3
votes1
answer7071
viewsWhy is the error "This view is not constrained ..." in Constraintlayout?
What is the reason for this mistake? This view is not constrained, it only has designtime positions, so it will jump to (0,0) unless you add constraints XML <?xml version="1.0"…
-
3
votes1
answer199
viewsHow to call youtube API with multiple parameters?
I’m trying to get the data from various videos, but the Youtube API is separate for videos and playlist, then I used the API of playlist to obtain the VideoID of each video in a given playlist, but…
-
3
votes1
answer265
viewsButtons (Action) in the notification. How to know which one was clicked?
The purpose of the notification is to show a question to the user, and the user has two response options, "YES" or "NO". The problem is knowing which button the user pressed. Another thing that I…
-
3
votes0
answers2629
viewsBackground function with React Native
I have two functions, one that takes the current position of geolocation and the other that performs this function in a given period of time. I have a button that I use to initialize and pause this…
-
3
votes1
answer530
viewsImage capture for Base64
Man app take an image from the gallery or take a photo, how to grab this image and convert to Base64? private void onCaptureImageResult(Intent data) { Bitmap thumbnail = (Bitmap)…
-
3
votes2
answers2623
viewsView PDF in Webview
I am developing an application for a Clinical Analysis Laboratory. It has an online system where you can view the results. On the site, it has a list of all customer exams and when I click on the…
-
3
votes3
answers150
viewsProblems using string for resources
I’m creating an app quiz, the link is https://github.com/luisbalmant/QuickQuiz-Science. I’m trying to use the getString(R.string.nome) to migrate the java class strings and then be able to use 2…
-
3
votes1
answer238
viewsIgnore attribute in POST using Retrofit
I would like to know how to ignore a model attribute in a request POST with Retrofit. In requests GET I want to bring all attributes, but in requests POST I need to send the object without the id…
-
3
votes2
answers260
viewsRetrieve json object
I have the following object: { codigo : "1", nome : "Carlos" } Java class (POJO) public class usuario{ @SerializedName("codigo") private int codigo; @SerializedName("nome") private String nome; /*…
-
3
votes1
answer226
viewsDownload data in JSON
[ { "ID": 1, "ano": 5 } ] I don’t know how to get in JSON the value of each of the fields, in this case "1" and "5", as shown above. In obtaining the data in JSON I tried to follow some tips that I…
-
3
votes1
answer1098
viewsLogin with Android PHP and Mysql
Hello! Following a tutorial I created an app that includes registration and login with android PHP and MYSQL, the registration works perfectly, only that in the login part when the entered data is…
-
3
votes2
answers1981
viewsHow to subtract hours in java?
I am trying to days make the difference of hours in my application. The case is as follows: Based on the Current time and current minute, I want to compare another time I have in a string and I need…
-
3
votes1
answer2285
viewsWhat is the best method to create forms in Adroid?
I am creating a registration form, to add and edit SQL records. I found a place that indicated to do through ScrollView, so that the form has a scrolling, and in my case it would be really…
-
3
votes1
answer659
viewsSave status of a Checkbox
I need to save the status of my Checkbox, they’re inside a Spinner, and every time I open Spinner he cleans the Checkbox. Admlistagem.java final String[] select_qualification = { "Todos", "1", "2",…
-
3
votes1
answer866
viewsClose Dialog after 10 seconds open
I would like the dialog close after 10 seconds. I can only do it by clicking the button. Follows the code. AlertDialog.Builder alert = new AlertDialog.Builder(this); WebView wv = new WebView (this);…
-
3
votes1
answer922
viewsHow to create an emulator without using the ide?
I need to emulate android on my machine, but I did not want to use a virtual machine because it would use many features, wanted to use sdk tools android studio, but also did not want to install…
-
3
votes2
answers2465
views2 decimal places using double
I am learning to program, I am making an application with 3 edittext (where I insert the numbers I want to calculate) and a textview to present the result. I would like to know how to calculate 2…
-
3
votes2
answers772
views...on a null Object Reference
Hello, I am at a time with this problem and I can not find solution, I have looked thousands of topics and I can not understand yet why this error appears to me. Error…
-
3
votes3
answers915
viewsRandom without repetition
Well, I have a question that’s been killing me for a long time, and I can’t fix it. PS: I’m a beginner on Android. I am developing an application of raffle, but I am not able to generate a Random…
-
3
votes1
answer31
viewsIs action confirmation widget possible?
I have to put a Alertdialog to confirm if the user really wants to perform certain action, it is simple to do this in an Activity or Fragment only I’m having problems to do this in the widget, I…
-
3
votes0
answers83
viewsInventory with Android
I’m trying to create an app for product control type an inventory, in case the user selects on RadioButton the product and then with scanner will read the equipment serial. The scanner is working,…
-
3
votes1
answer2462
viewsAdjust Image/Bitmap to Imageview or adjust Imageview to Image/Bitmap
I’m trying to create a menu screen something like this: To make this cut diagonally, I made this image to stay on top of the background: However, in Android Studio, I can not resize the image to…
-
3
votes1
answer233
viewsError executing delete in Sqlite database
I’m having a problem with my project Android. When I execute a delete at the bank sqlite, I get as return the following log message: W/FileUtils: Failed to chmod(/storage/sdcard/Cardapio…
-
3
votes0
answers44
viewsPick up on Mainactivity events in App.xaml.Cs
I have it on my App.xaml.Cs CrossFirebasePushNotification.Current.OnNotificationReceived += (s, p) => { System.Diagnostics.Debug.WriteLine("Received"); }; When I receive messages, ie have…
-
3
votes2
answers220
viewsOpen a lightbox image in the same layout from a button
Good morning, you guys. I have a problem that I can not solve, I’ve fucked enough in the posts here and in the tutorials Youtube and nothing. I’m developing an android app for a project in college,…
-
3
votes2
answers2936
viewsHow do I search the table with Sqlite?
Good guys, how do I make a select in a table using Sqlite on Android? So far I have the table created and the Insert. For example: search by User login and password, to be able to compare. Follows…
-
3
votes1
answer45
viewsError inserting data into Sqlite : java.lang.Illegalstateexception: getDatabase called recursively
1-07 22:50:59.756 11315-11315/com.dev.bob.rent E/Androidruntime: FATAL EXCEPTION: main Process: com.dev.bob.aluguel_automovel, PID: 11315 java.lang.Illegalstateexception: getDatabase called…
-
3
votes1
answer6369
viewsHow to build a SELECT on Sqlite?
I am new in Android development, I am using Sqlite as a bank. I need to make a SELECT, and return the values of three columns of my table. Then I need to set the attributes of my object with the…
-
3
votes2
answers216
viewsUse of Google Admob
I am using google admob to place ads in my app, but I have some questions I can use the same ad block (id) for multiple Activity (each with a block)? How do I make the ad the first thing to load?…
-
3
votes1
answer286
viewsonclik event() Error opening camera
I’m developing an android app I have an event on the Button to open the camera: On Androimanifest.xml <!-- Permissão para acessar a área de memória externa --> <uses-permission…
-
3
votes1
answer121
viewsHow to make two Retrofit chain calls with Rxjava?
I make a call to recover some data and the second call - which should be made inside the first one - uses one of the fields of the previous call. val restApi = retrofit.create(RestAPI::class.java)…
-
3
votes1
answer407
viewsDuplicate focus when using requestFocus in an Edittext
I created a screen with 2 fields EditText, one with numerical input and another text. What I want is to execute a validation in the first field when it loses focus, and if invalid, return the focus…
-
3
votes1
answer527
viewsHow to capture camera image from your phone and send it to the server via Rest using Volley?
I’m developing an application MOBILE that communicates with my web application, the application developed in Android Studio and the web on Playframework. I created a form on APK that already makes…
-
3
votes4
answers3854
viewsfindViewById no Kotlin
I was generating an action by clicking on a Button fun cliqueBotao(view : View){ var texto = findViewById<>(R.id.textoExibicao) as TextView texto.setText("Texto alterado") } Only that Android…