Reputation: 21508
I am trying to implement a simple tree-like menu. I have a ListView
as the root. Each item is a custom View
that consists of an arrow icon at the right if it has a submenu and a checkbox taking up the rest of the row. This is all great.
Now here is what I want to do and can't figure out how (I am new to Android, but Googling didn't help me): If the user slides to the left on an item with an arrow, the whole list will slide out to the left and the corresponding submenu will slide in from the right. If the user slides to the right anywhere on the menu, the whole menu will slide out to the right and the parent menu will slide back in from the left. When you picture it it is really a simple concept.
My problem seems to be double:
Any help or reference would be appreciated.
Upvotes: 1
Views: 1642
Reputation: 23655
For the Sliding, check out the ViewPager
class and the matching Adapter class, but generally what you describe sounds a lot like iOS and you should rather not try to duplicate a behaviour that's alien to Android users.
Upvotes: 1