I am trying to read a specific row and column from an ArrayList<String>
to display it in a textview.
In a previous activity I read a Firebase table and stored all information selected by the user in an ArrayList<String>
. I do a putExtra
, and I recover all data by a Bundle
. The ArrayList<String>
recovered seems correct. But now I don't know what to do to read this ArrayList
.
I've looked at different solutions in Stack Overflow and Github without success.
Have you any idea?
From your picture, it seems you don't have an ArrayList<String>
but rather a ArrayList<ArrayList<String>>
To access it, use .get(index)
ArrayList<ArrayList<String>> ContenuAnnonceA;
int i=1, j=2;
String s = ContenuAnnonceA.get(i).get(j);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.