Is that even possible? Lets say I created a ListView with an arraylist thats poplated with objects in one activity. Now I clicked on an item off the list view and grabbed the index. Once I clicked on the item it takes me to another activity along with the index number.(Using Intent). Now my question is I want to view the clicked item's information using the index number to access the arraylist that was created in the previous activity. Is this possible?
UPDATED WITH ITEM CLASS. NOT SURE HOW SHOULD I MODIFY TO SINGLETON CLASS
public class Item {
private String name;
private String category;
private int grade;
public void setName(String n){
name = n;
}
public void setCategory(String c){
category = c;
}
public void setGrade(int g){
grade = g;
}
public String getName(){
return name;
}
public String getCategory(){
return category;
}
public int getGrade(){
return grade;
}
@Override
public String toString(){
return getName();
}
}