I have an ArrayList which get all it’s entries as strings from DB
List<Amthal> amthal = getAmthalSetFromDb(p);
I can get it’s size “how many strings it contains”
int i= amthal.size();
I want to view these strings in TextView one after the another by clicking next button to move to next one
I tried to view any string in that array list but I got an error… “get(i-1)” which must return last string in that array …
tv.setText(amthal.get(i-1));
my question is how to retrieve and view these strings ? should I convert it to Array of strings or what??
You can solve your issue by using an counter varaible as :