Questions tagged as 'android'

1
answer

Set image as a layout background indicating the name of the image on a String

I am making a simple application and I find that I am not able to change the background to a layout by indicating the name of the image in question by String. The code I have is this: fondo.setBackgroundResource(R.mipmap.ff); Where "ff"...
asked by 26.12.2016 / 14:42
2
answers

Cordova - Is it possible to send push notifications, keeping the app completely closed, without running?

I'm in full development of an app in Cordova (Android + iOS), and I need to run a series of push notifications, sent from the server. These should work when the app is running in the background, or the device blocked, or directly with the app wi...
asked by 30.12.2016 / 16:09
3
answers

When is onDestroy what happens with the classes instantiated in the activity?

Good morning, When an activity is destroyed on Destroy what happens with the classes that were instantiated in this activity, are they also destroyed or are they loaded in memory?     
asked by 13.12.2016 / 03:48
1
answer

How to format the result of a date?

I have developed a code where I put in an EditText the time after selecting it, with this following code the problem I have is when I select a time like 05:08 I get in the EditText 5: 8 (because it is in AM) but If I was in PM, the same time I g...
asked by 21.12.2018 / 18:58
2
answers

SQLite how to order from highest to lowest?

I would like to know how I can do a ORDER BY or order the query ascendingly, this is the code I tried but it sends me an error that the application has stopped. public Cursor readData() { String[] allColumns = new String[] { Databas...
asked by 02.02.2016 / 14:59
1
answer

Android can not modify a textview

I have a TextView that is not updated at runtime. Said TextView is defined by the following XML code: <TextView android:id="@+id/agi_val" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" />...
asked by 20.09.2017 / 14:23
1
answer

WiFi scans are not received when running startScan () on Android 8 with targetSdkVersion 26+

I'm working on an application that uses WiFi scans to work. I use the method startScan() of the class WifiManager and I have programmed a BroadcastReceiver to be notified when the scan has finished and the results can now be...
asked by 21.05.2018 / 14:02
1
answer

Change color the title of the AppBar

please I need help I can not change the color of the title of the appBar, in mine it turns black and I would like to change it white .. in this case I am using a toolbar try it with everything I put <item name="colorAccent">#FFFFFF</...
asked by 30.03.2016 / 13:48
1
answer

Android adapter to reorder by distance

I'm trying to reorder my list of items by distance (using getListView from Android, not a custom one) and I'm having problems. I'm getting the spherical distance in meters (double type) using Maps Utils inside the adapter (SomeAdapter). dou...
asked by 05.10.2017 / 19:51
2
answers

What is the XML property fitSystemWindows (android) for?

android:fitsSystemWindows = true On several occasions I have come across this property for the preparation of layouts, however on many occasions this same cause unexpected behavior, which take time to identify that this causes it. Definitio...
asked by 21.10.2017 / 07:05