Questions tagged as 'android'

1
answer

Problem does not work setOnChildClickListener in ExpandableListView

I have an ExpandebleListView as a menu in a navigationDrawer, I need to add event listenes to the child items, however I do exercise for each parent and child group, in the parent groups you can get the position with setOnGroupClickListener fo...
asked by 27.10.2017 / 17:42
3
answers

how can I increase the degrade android

I want to increase the degrade so that the target is closer to the middle, how can I do it? <item> <shape> <gradient android:angle="0" android:endColor="#E8E8E8" android:st...
asked by 06.06.2018 / 14:58
1
answer

List Order

My query is as follows: I have a list of objects where each one receives a latitude and longitude. Using a CustomAdapter I show the objects and with a method I calculate the distance between my position and that of the list to show how many kilo...
asked by 23.11.2017 / 14:06
2
answers

How to leave a service running in the background on Android by closing the application that starts it

From an Android application I create and execute a service that runs on a thread and runs in the background, but when the main application is completely closed, the service also dies. The thread I think I declare as Daemon but still "kill" th...
asked by 25.05.2017 / 13:39
1
answer

Find a character that is not a space or a letter, including accents and diacritics of Spanish

I want to include the space and only accept letters, numbers and accents and the special character > ñ . What I have done is the following: if (primernombre.length() == 0 || a.matches(".*[^a-zñáéíóúA-ZÑÁÉÍÓÚ].*")) { primerno...
asked by 04.01.2017 / 16:12
1
answer

Android: NullPointerException in .getIntent (). getExtras ()

I'm in an android class project and I have it almost finished but I need to pass some variables from one activity to another, it gives me NullPointerException and looking for I have not found anything.    Logcat       Caused by: java.lang.Nu...
asked by 11.01.2018 / 19:32
1
answer

Initialize SharedPreferences from a class that does not extend from activity

I am trying to get an app to start automatically when the device is turned on as long as the user wants. To do this, I save the value of a variable using SharedPreference . The problem is that for this I use Read and Save methods, that bei...
asked by 25.07.2017 / 08:21
1
answer

Various ProgressDialog in recursive request using Volley and AsyncTask

Hi, I'm doing request using the library Volley to API to get many records approximately 8,000 and save them in BD . The response of API brings a parameter count with the total of the objects and...
asked by 29.01.2016 / 01:34
2
answers

XML parsing error: duplicate attribute

Why this 'error'? I do not have any duplicate attributes. What is the solution? MESSAGE ERROR activity_commerce.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/r...
asked by 08.02.2016 / 13:57
2
answers

Load an Image from the Android Gallery

I click on the image and it lets me select one from the gallery, but when I select it, it does not change. I know I'm missing part of the code, could someone help me with it? Thanks! MainActivity: public class MainActivity extends AppCompat...
asked by 30.12.2016 / 17:54