For example if I have a class:
class Folder {
public String name;
public ArrayList<Folder> subFolders;
public ArrayList<Folder> subFolders;
}
And I am trying to fill ListView with custom ArrayAdapter and then navigate through this ArrayList "Folders" which is filled with data. I try something like this to show subFolders:
private OnItemClickListener listlistener = new OnItemClickListener() {
@Override
public void onItemClick(int position, long arg3) {
currentFolder = (Category) parent.getItemAtPosition(position);
folders = currentFolder.subFolders;
folderAdapter.notifyDataSetChanged();
}
};
But it does not work. Is there any suggestions to help solving this problem?