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
-
2
votes1
answer287
viewsError calling getLayoutInflater() inside a Fragment
I’m having a problem creating a custom window. The idea is to have a balloon that presents an image and some basic information about a location, with a link to another activity in greater detail.…
-
2
votes1
answer72
viewsI need to create an Intent inside another Intent
Created a Widget APP with 3 buttons. In this code snippet assigns button functions: for (int i = 0; i < N; i++) { int appWidgetId = appWidgetIds[i]; RemoteViews views = new…
-
2
votes0
answers192
viewsSend JPG via JSON
I need to send this image to my post api, private void onCaptureImageResult(Intent data) { Bitmap thumbnail = (Bitmap) data.getExtras().get("data"); ByteArrayOutputStream bytes = new…
-
2
votes2
answers5047
viewsHow to properly organize DP and DPI for each screen type on Android?
Is there any kind of formula or way to know the following questions without having to "build" all the time to check? How to know if that Image/Text/Button or whatever is visibly good for the user on…
-
2
votes1
answer761
viewsHelp with React Activate
Guys I have an annoying error when installing React: ~/MyApp $ react-native run-android Scanning 555 folders for symlinks in /home/henrique/MyApp/node_modules (4ms) Starting JS server... Building…
-
2
votes1
answer156
viewsJSON parse class java
I’m having some doubts, as I do to parse a JSON that is coming from the webservice. My class comentarios is like this: public class Comentarios extends BaseEntity { private Integer avaliacao;…
androidasked 7 years, 6 months ago Renan Rodrigues 3,709 -
2
votes1
answer636
viewsHow does the use of DPI Layouts and Redeemers work?
In the Android there are so-called "DPI", who are pixel densities. Each screen has its kind of DPI as an example: Smartphones: layout [?] layout-ldpi [240x320 & 240x400] layout-mdpi [320x480…
-
2
votes1
answer1860
viewsWebview opens browser
I made an application via Webview on Androidstudio, everything quiet without errors but when I put the information to login in my webview opens the default browser, I would like it to open in…
-
2
votes1
answer13343
viewsANDROID_HOME Linux Environment Variable
I am having problem with the environment variable ANDROID_HOME, whenever I try to run the command to run an app in the emulator (or mobile connected), this error message appears Error: Failed to…
-
2
votes1
answer1001
viewsHow to open a Alertdialog?
Well, I’m learning now about Fragments. From what I understand, fragments are components, something you want to repeat on several screens, without having to keep creating several classes or…
-
2
votes1
answer93
viewsLogin with facebook Android
I’m still studying programming for apps, I have a question that for you should be simple, I created an app and a Rest application the user makes the registration in the app and save the data in a…
androidasked 7 years, 5 months ago Eduardo Oliveira 69 -
2
votes1
answer115
viewsTrigger an event by pressing the 2x volume button?
I would like to trigger an event just by pressing the 2x volume button quickly. I have the following code, but it fires by pressing the button only once. How to make it fire only if pressed 2 times…
-
2
votes1
answer72
viewsEqual functions if
I have if and Else codes, but I don’t know very well,I’ll explain what I wanted to do , in my app, if I typed Right , posted in api as id - X ,if I typed Romance,posted with Id - Y , but he’s only…
-
2
votes1
answer270
viewsQuery the Database in Android
I would like a help from you to check what is wrong with this consultation: int raioKm = 10; String latitude = "CONVERT(" + "NUMERIC(10,7), " + "SUBSTRING(localizacao, 0, CHARINDEX(localizacao, ','…
-
2
votes2
answers700
viewsHow to install/run a signed app to view the error log?
I am developing an app and direct testo on mobile (LGE API Level 16) . When testo, runs normal. But when I generated a signed apk, and try to install this apk on the same phone it just says:…
-
2
votes1
answer1838
viewsError while performing findviewbyid
Hello, I want to find the id of two Textviews, but they are returning NULL. Follows my code: private TextView nomeUser; private TextView cargoUser; @Override protected void onCreate(Bundle…
-
2
votes1
answer115
viewsAndroid notifications are not released
I use RTP_WAKEUP to "wake up" my device when it realizes that it has notifications to release and in fact I can release notifications for 10/15 or even 20 minutes, but when I try to release a…
-
2
votes2
answers522
viewsWebview links do not work
Something has changed in the implementation of Webview, Webviewclient for android 7? I have some html files in a subfolder inside the Assets folder. The file html list., which contains other links…
-
2
votes1
answer325
viewsUsing an Activity/Fragment on a bottom sheet
I was doing a study on the Bottom Sheet, and I built something similar to this tutorial link. I was wondering how I could put together something similar to what the Uber app does. It is a bottom…
-
2
votes1
answer3044
viewsHow to get the context in a Fragment?
What should I insert into a method that needs the context argument in this Fragment ? public class Tab1tests extends Fragment { private ViewPager mViewPager; private…
-
2
votes0
answers86
viewsGet GPS location
I want to get the user’s location. My code is below, but when I run, I do not see anything, nor map the mark. public class Gmapfragement extends Fragment implements OnMapReadyCallback { private…
-
2
votes2
answers355
viewsAdvantage in giving null in a variable on Android
Assign the value of null in a variable on Android can improve application performance? As far as I know, in Java we have the Garbage Collector, and in Android, the activity cycle of Activities and…
java android null variable-declaration garbage-collectorasked 7 years, 4 months ago Guilherme Ramos 343 -
2
votes1
answer138
viewsSum in Textview
I have a Json that returns the values of positive and negative, and that sets the text in mine TextView. This is the calculation I try to do, but it returns a invalid double: public double…
-
2
votes2
answers1141
viewsAndroid calendar with events
At the moment I only have this calendar. I’m using the Materialcalendarview <com.prolificinteractive.materialcalendarview.MaterialCalendarView xmlns:app="http://schemas.android.com/apk/res-auto"…
-
2
votes1
answer940
viewsLimit amount of typed characters based on view width
I got the following EditText width defined as match_parent, basically occupying the full width independent of the device: <EditText android:layout_width="match_parent"…
-
2
votes1
answer75
viewsI can’t put hamburger symbol on Navigation Drawer Panel
I’m trying to put one navigation Drawer Panel in my app, but I can’t put the burger symbol on my MainActivity. The code I’m using is: public class MainActivity extends AppCompatActivity implements…
-
2
votes1
answer479
viewsIs it normal not to see anything indicating if I have implemented ads correctly in my app?
Obviously I don’t expect any real adverts to appear, but some indication that I did the procedure correctly so I know if it’s all right. 1st Image (Preview Android Studio) 2nd image (Application on…
-
2
votes1
answer299
viewsHow to recover several actions from one Active to another?
How do I send an Activity url to another with different click actions (multiple buttons)? I tried to use intent.putextra but I can’t recur the urls of the other buttons, in case I’m using two…
-
2
votes1
answer489
viewsHow can I browse this JSON and recover the Movies list?
I am having difficulty going through this JSON and extracting the data from the "Movies Array". Follows JSON: (https://yts.ag/api/v2/list_movies.json) The mistake is this:…
-
2
votes1
answer59
viewsAdd interaction in listview!
I have a problem in my listview. I’m listing all the cars that the user has, but when he clicks I want to get the information of this car to process, only in the tutorials that I see the guys have…
-
2
votes1
answer329
viewsComponent on another Android
I am developing an application using android studio 2.2.2 and would like my application to look like this: But when putting textView on the imageView it is under the image, I tried to use…
-
2
votes1
answer895
viewsSet textview default color on Android
I have a custom Textview, currently it arrow the color of the text to white, however, I wanted this to be the default color, IE, that was chosen white if not set a color with textColor in xml, how…
androidasked 7 years, 3 months ago felipe.rce 1,969 -
2
votes1
answer22
viewsGood practices with Android comic book
What would be the best practices in relation to sqlite on Android? I use a single db Contract for all tables (each table a class within the main class Contract)? public final class…
androidasked 7 years, 3 months ago felipe.rce 1,969 -
2
votes1
answer595
viewsQuestions Spring Boot Web App -> Android
A few weeks ago I finished the project of a web system that makes basic Ruds, I used Java, Maven, Spring Boot, Hibernate, Bootstrap + Thymeleaf pro frontend, etc... And I deployed to Heroku using…
-
2
votes2
answers293
viewsMVC Doubt on Android
Would you like to know the following, in Android development using MVC, for each Activity I have to have a Controller and maybe a DAO? Or can I use the same Controller class that controls two…
-
2
votes1
answer339
viewsMy application does not give error, but nothing appears on the screen (Xamarin)
Developing and learning Xamarin. I took an example of Macoratti and decided to implement, because it comes to consumption of REST with Xamarin. I did everything as it is on the author’s site and…
-
2
votes2
answers370
viewsHow to Change Linear Layout Transparency
I have a login screen that has a LinearLayout blue background tranparente. How can I do this LinearLayout with id be translucent? <?xml version="1.0" encoding="utf-8"?> <LinearLayout…
-
2
votes0
answers65
viewsCheck app idle time
What is the most efficient way to check for app idleness? I need to close the app if I haven’t interacted with it in a while. I have a working solution, but maybe there’s something more appropriate…
-
2
votes1
answer323
viewsHow to place line to split items in a Spinner?
I’m trying to place a line dividing the items I have in a Spinner but I can’t seem to get it out. spinner_item.xml <?xml version="1.0" encoding="utf-8"?> <TextView…
-
2
votes1
answer338
viewsAn unhandled Exception occured. I cannot understand this message, no detail comes
Personal that message: An unhandled Exception occured. It always happens when I try to consume my service REST. I first made an example, copying from Macoratti and it worked. Then I adapted it to my…
-
2
votes1
answer235
viewsArray elements based on position
I’m developing a small project in android studio where I have a listview where the data is introduced through an array. But what I need is, when the user selects some element from the list, based on…
-
2
votes1
answer576
viewsHow to set a minimum date in the datapicker?
I would like to put a minimum date on my datapicker, because I cannot yet: follows below the code so you can help me, and in my layout only has an Edit text and the datapicker only appears when and…
-
2
votes1
answer1733
viewsHow to read Json with multiple lists (DELPHI)?
I’m using the XSUPEROBJET examples to read the Json below, but the examples use simple Json structures, and they work, but when I try to read the structures with multiple lists they don’t work. I…
-
2
votes2
answers698
viewsHow to make Linearlayout stay at the bottom of the screen?
I’ve tried many things here to make my Linearlayout stand at the bottom of the screen but I can’t do that. I need to do this with Linear which has id= "underneath" Does anyone know? Follows my xml:…
-
2
votes1
answer896
viewsChange icones colors dynamically
I have the following question: I have several icones in my design, some white and others black. Is it possible to change the color of the icon without importing an icon already in the specific…
-
2
votes2
answers504
viewsQuery with android sqlite java filter
public ArrayList<Contato> filtrar(String filtro) { ArrayList<Contato> contatoArray = new ArrayList<>(); //Consulta que traz todos dados de todas colunas Cursor cursor =…
-
2
votes1
answer53
viewsHow to specify the sequence of activities to be initiated?
Hello. I have a question. I have an APP in which 8 Activities, among them has a Splash Screen Activity that presents my logo and then enters my APP. The Splash Screen is set as default, but I need…
-
2
votes1
answer84
viewsWhen registering my class, it turns on the Onappearing method
I have been trying to notify with Xamarin and Xam.Plugin.Pushnotification. The problem is when I register the plugin. It does not work at the time when the method Up-to-date() is called. In reality…
-
2
votes3
answers1344
viewsERROR: No Resource found that Matches the Given name: attr 'colorAccent'
I created a project from scratch and when I went to compile it is giving this error. I already updated the Android SDK and still the error continues. It’s giving in all the nodes of Style.xml.…
-
2
votes1
answer48
viewsNoclassdeffounderror after removing external API (Youtube)
I’m developing a cool project and I came across a difficulty that I couldn’t get out yesterday, the project stopped recognizing all api’s, butterknife, Youtube, everything... Follow the error:…