Android menu with arbitrary ListView nested list

I want to create something like this:

widget demo

That is, a menu where I can submit an arbitrary nested tree of lines, which then leads to an activity that has access to the selected item.

Should I create a TreeSelectActivity activity TreeSelectActivity , then pass it a List<TreeNode> in the bundle, and then recursively create a list of the following actions for each element? One action for each item does not seem to be the correct way to do this. Maybe it would be better if they were fragments?

What are the pros and cons of different approaches to this, and which approach is the easiest to implement?

+7
android android-activity listview menu
source share
1 answer

Check out the Wizard Pager to see if this does what you need.

Otherwise, you can implement it as an action that takes a tree and has an adapter that shows its current level, and then passes subtrees to new actions using additional options.

Or you can implement it as a fragment that does roughly the same thing and stays in the same activity and just does FragmentTransactions.

+2
source share

All Articles