Akarsh M Akarsh M - 6 months ago 308
Android Question

How to make a Persistent Navigation Drawer in Android?

I have search a lot but manage the Navigation easily but at this time need to Implement Persistent Navigation Drawer.

https://www.google.com/design/spec/patterns/navigation-drawer.html#navigation-drawer-behavior

Please let me know the process to Manage or Sample Tutorial of **Persistent Navigation Drawer** shown in below Image. LinkedIn Android Application is using the same navigation drawer.


enter image description here

Thanks

Answer

I have implement "Persistent Navigation Drawer" via ViewPager and works fine as what I need.

Just use width as 0.8f in PagerAdaper/FragmentPagerAdapter

@Override
public float getPageWidth(int position) {
    // TODO Auto-generated method stub
    if (position == 0) {
        return .8f;
    }
    return 1f;
}