-4

How to create a navigation drawer like the attached image. I've done android's default navigation drawer. enter image description here

Sivakumar
  • 633
  • 4
  • 9

1 Answers1

0

You can use a custom Adapter for your navigation drawer:

mDrawerList = (ListView) findViewById(R.id.left_drawer);
mDrawerList.setAdapter(new DrawerAdapter(this, R.layout.yourcustomlayout, items));

And define a custom adapter with getView method:

public class DrawerAdapter extends ArrayAdapter<?> {
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        // customize your list item here
        // add icon for example
    }
}

Background and text colors should be set in your custom layout.

More info here

Community
  • 1
  • 1
DavidL
  • 1,120
  • 1
  • 15
  • 34