Tuesday, 10 September 2013

Android ExpandableListView or List Adaptor

Android ExpandableListView or List Adaptor

Android phone app. I will describe the situation and then pose my question
afterwards.
I want to give the user the ability to pick an option from an expandable
list, but when an option that has sub options (children), I want to just
display those child's option(s). So.. not the normal functionality for the
Expandable ListView list.
So... instead of "expanding" and showing a list, only the items from the
sub-menu/list would be displayed.
Example list
Item 1
Item 2
Item 3 >
---- Sub Item 1 for Item 3 (Item 6)
---- Sub Item 2 for Item 3 (Item 7)
---- Sub Item 3 for Item 3 (Item 8) >
-------- Item 9
-------- Item 10
Item 4
Item 5
In the above example, the user would initially see Items 1 to 5. If any of
an items from this top list are selected (user touches it).. except for
Item 3, you are done... selection made.
If Item 3 is selected... then a Sub list of items for item 3 is shown...
just Items 6,7,8.. I want Items 1 through 5 to no longer show on the
screen.
If Item 8 is then chosen, only Items 9 and 10 would be on the screen for
the choices.
Is an Expandable ListView the way to go or maybe a List Adaptor? or
something else.?
I have searched for hours to see something similar. Any possible solutions
are appreciated. I do not mind doing hours of legwork, just stuck and need
direction.
A bonus would be to show a ">" symbol to the right of a choice that has
sub choices under it. I have tried to show this for items 3 and 8.
I appreciate your time in reading this.
Thanks.

No comments:

Post a Comment