Question

I am trying to make a navigationDrawer in Android v4.0+ to be exactly like in this example in the official documentation of android.

However I do not find any documentation how to achieve this. All I can find is telling me to extend the ListView, but that just sounds weird as it looks like the native android classes should have this kind of functionality.

Was it helpful?

Solution

I think you are looking for "ListView header items". One way to achieve such layout is to let your (custom) adapter know that the items at specific positions (or some other criteria) have to be displayed with different layout and populate a different view for those items in it's getView method.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top