I want to create something like this:

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?
android android-activity listview menu
Ell
source share