Questions tagged as 'android'

2
answers

Extract data from an EditText and add them to object

I have the following code: ArrayList<Lista_entrada> llibres = new ArrayList<Lista_entrada>(); // Afegim uns llibres d'exemple. llibres.add(new Lista_entrada( "BUHO", "Búho es el nombre común d.")); llibres.add(ne...
asked by 17.10.2018 / 14:44
1
answer

Obtain multiple objects in PHP - JSON with Retrofit2

I'm trying to make a simple project of a gallery for android and I have a problem when it comes to getting the images from the server and showing them in my application since it only returns the first registered image and what I'm looking for is...
asked by 06.10.2018 / 07:17
1
answer

compare saved data in Android Studio Firebase

I have the structure corresponding to the data stored in Firebase Database via android I want to obtain the data indicated in red the last 2 or 3 "doses" saved. I have this structure but I do not know if it is the correct one to obtain...
asked by 05.10.2018 / 02:43
1
answer

Call last three values in Firebase Database Android Studio

I have this code and it calls me the "Node" line that I have saved in Firebase Database DatabaseReference fReference = database.getReference().child(Lista); final StringBuilder sb=new StringBuilder(); final StringBuilder sp=new StringBuil...
asked by 04.10.2018 / 00:09
2
answers

How can I open another activity that is not the main activity?

I want to open from a notification the acitivity main and another depending on a parameter but I can only open the main one and when receiving notifications with the open app this closes the code is as follows. private void enviarNotificacion(...
asked by 17.04.2018 / 20:34
1
answer

Eventhandler function

I am building a page (Xamarin, C #, Android), and I have put a button where the definition of the onclick event, forces me to put it as a private EventHandler. The error that throws me is that "not all the code access paths return a value". On t...
asked by 18.04.2018 / 00:53
2
answers

Show Selected item of a dynamic spinner with a Toast on android

I have a text edit and a button that add values to an adapter and it is shown in a listView and a spinner, I want to show in a message the selected element, here my code: public class MainActivity extends Activity { EditText txt; Butto...
asked by 14.04.2018 / 19:46
2
answers

Error: NullPointerException to null object reference (Android)

I have a project in Android in which I send the value of a variable from Adapter to Activity like this: public void onClick(View v) { Intent inicioIntent = new Intent(context, Activity2.class); inicioIntent.putExtra("idU",...
asked by 13.09.2018 / 17:48
1
answer

Android listview arrayadapter sqlite

I'm trying to fill a listview with data from a sqlite table but I do not know what I'm doing wrong, here's the code if someone can help me, the instruction is at the end in btnconsultar . protected void onCreate(Bundle savedInstanceState)...
asked by 11.09.2018 / 21:18
1
answer

How can I empty a RecyclerView before refilling it?

I have a RecyclerView in which I load the messages of a chat, and what I need is that when the user connects to Internet , the RecyclerView erases the messages that you have already saved and add the new ones that are obtained fro...
asked by 04.09.2018 / 19:46