i want to make a generic solution for multilevel listView. i have a datarow with 8 columns.
1st level of my listview: there should be only three columns when i click on one list item, another listView should appear (2nd level) with all columns.
this should not be limited to 2 levels, there could be hundreds of them.
My solution now is to start the same activity multiple time and pass the columns to the new activity. For me that does not seem to be the right way.
the problem on this solution is, that when i go back (action bar - up navigation) the first level appear and not the last one.
i want multiple levels, each level has more detailed information from the level before. when i go up or click the hardware back button i want to go to the previous level.
Use fragments (check ListFragment) for every level, when moving up/down the levels you just have to replace the old fragment with a new one, adding the old one to the backstack.
http://developer.android.com/reference/android/app/ListFragment.html http://developer.android.com/training/basics/fragments/communicating.html