1
I have a Webservice that lists all my users and brings users from the bank.
I have a class
Usuario {
int id;
String nome;
}
With its builders, gets and sets, etc.
And I can return all my users.
However, I want to play all of this on a Listview. I got it. But I managed using an Arrayadapter of Strings and a list of String, IE, step only the name.
How will I be able to associate this name with your bank id so I can recover change the screen using the Onitemclicklistener() event if I just pass the name?
Can you do this without having to display the id on the screen? (without using two textviews, etc).
I want to use a same Listview, just show the name. But I have to filter on the other screen by id using putextra, etc.
My difficulty is to associate the ID to the Name, I’ve tried creating a list of Users, but it’s not the way I want it.
And now what I do?
when we ignite an Adapter our list is listed with a
position
, when the methodOnItemClickListener()
is called, it will know which position of the list was selected, at the moment I can not put an example, but as soon as possible I put here.– Wellington Avelino