So I have an activity that will display a list of options and when you click an option it should move to a list that displays the choices for that option, but I’d like both lists to be in the same activity.
I’m debating between the two options of using a single listview and changing the contents (maybe by swapping the adapter if that works, not sure) whenever a user navigates between the two lists, or using something like a viewswitcher where both lists exist independently, but only one is visible at a time.
I would definitely think the viewswitcher option would be the cleaner option, but how will it perform especially if I need to scale it to more than two lists? Is there much overhead to creating a listview that’s not rendered?
Keeping one listview and switching out its backend would be a pain, especially considering all the re-initialization every single time you click an option.
-Use two ListFragments, have one control the other. Using Fragments instead of two separate ListActivities would mean that when you build a tablet interface, it would be minimal work to have one Activity with both on the same screen.
-Use an ExpandableListView