2

as I pursue my study on android app development I came across this app from apple and I was wondering if, is there a way to imitate the navigation drawer in this screen shot?!

enter image description here

See it's an expandable navigation drawer. a list view with some items that are expandable. Is there an actual way to imitate this on android?

Thank you very much again for all of your help.

JJD
  • 50,076
  • 60
  • 203
  • 339
cha1988
  • 29
  • 8

2 Answers2

1

Use a Custom ListView for this, see here for that: How To Create A Custom Listview - Android Example

Also, you will have to create specialized buttons that have a different look than standard holo buttons, see here for that: How to create custom button in Android using XML Styles

Finally, I do not believe it is possible to directly clone the navigation drawer, as the app you showed doesn't have an open sourced app (as far as I know).

Community
  • 1
  • 1
ElectronicGeek
  • 3,312
  • 2
  • 23
  • 35
  • I think i wasn't that clear whit my question. I'm already aware on how to create both of your suggestions so what I was trying to do is to imitate the behavior of the app on the screenshot. You see it has a navigation drawer that holds some item which is actually an expandable item. It's like asking; "How do I put an expandable item in a non-expandable list view?" ass seen on the image that i attached, the drawer is a list view with some expandable items but not all. – cha1988 Mar 12 '14 at 01:36
  • Just use an expandable ExpandableListView but don't make all the parents expandable. Just override their touch even to do what you want. – Steven Trigg Mar 12 '14 at 01:53
  • Thanks Steven, I'll try that one later. – cha1988 Mar 12 '14 at 04:32
1

You can recreate that drawer.

You can use the ExpandableListView within the Navigation Drawer. And of course you'll have to create your own parent and child item layouts for the listview. As well as appropriate styling. You can use tutorials to do this, first create the navigation drawer, then create the expandablelistview and put it within the navaigation drawer layout.

I'd also like to note on that screen shot, the drawer is incorrect. It should slide out below the action bar, over-top of the activity (like in the link). It should not slide the entire application window to the right like how some apps do.

Steven Trigg
  • 1,903
  • 2
  • 19
  • 22
  • So basically sir what you are saying is that simply create a drawer navigation and put two item; first would be a non-expandable items and below that are the expandable items? Is that correct sir? I'll post my project screenshot here once I'm done. Thank you so much sir for those pointers that you've mentioned. – cha1988 Mar 13 '14 at 03:04
  • Yes it is just a layout like any other. You can put multiple lists in there if you wanted to. Or just multiple items, not in a a list. – Steven Trigg Mar 13 '14 at 03:07