Easy to use Custom DrawerLayout, that slides and resizes the whole screen content when navigation view is pulled out.

Following are the steps to use this library

  1. Add this "maven{url ''}" to the repositories section of allprojects section in project level build.gradle.

  2. Add dependency "com.github.saxenautkarsh:SlidingContentNavView-android:0.1.0" to dependencies in app level build.gradle
    (Or just follow the instructions given here for step 1 and step 2)

  3. Now instead of using DrawerLayout use ContentSlidingDrawerLayout in the xml.

  4. After inflating this layout in onCreate method, call method contentSlidingDrawerLayout.init(activity,navigationView,actionBar). If action bar is not used then you can use method contentSlidingDrawerLayout.init(activity,navigationView) .

  5. Add onOptionsItemSelected listner for opening Navigation View by clicking on Hamburger icon.

  6. Your Activity code will look something like show below Screenshot_from_2018_07_16_21_00_27

  7. That's all you are done.

Alt Text

Slidingcontentnavview Android

Slidingcontentnavview Android Info

⭐ Stars 14
🔗 Source Code
🕒 Last Update 6 months ago
🕒 Created 4 years ago
🐞 Open Issues 0
➗ Star-Issue Ratio Infinity
😎 Author saxenautkarsh