SlidingRootNav is an easy-to-use alternative for fans of the old Android SlidingDrawer interface.

Subscribe now

Get the highlights in your inbox every week.

Applications that used Android's SlidingDrawer library enabled users to hide content offscreen, then drag it onscreen using a "handle" when they wanted to use it. Unfortunately, the library was deprecated in Android 4.2, JellyBean (API 17), but independent developers have stepped in to create alternative versions for those who miss the cool animation and better UI experience it offered.

In this tutorial, we'll create a Sliding Drawer interface with SlidingRootNav, an open source alternative that is very easy to implement.

The code shown below works with the latest version of Android (API 28). It was created using the Android Studio IDE and the Android Gradle build tool (but it can also be done with Eclipse and other IDEs). Make sure to take a look at your IDE before jumping into this project.

Topics

About the author

Baradwaj Varadharajan - Founder/blogger of Androidmonks.com, open source blog/website giving out free content related to Android.
If you ever wanted to learn Android. Don't pay a dime. Go check out
https://androidmonks.com
Also a time traveler, entrepreneur, author of several fun workbooks!

Footer

The opinions expressed on this website are those of each author, not of the author's employer or of Red Hat.

Opensource.com aspires to publish all content under a Creative Commons license but may not be able to do so in all cases. You are responsible for ensuring that you have the necessary permission to reuse any work on this site. Red Hat and the Red Hat logo are trademarks of Red Hat, Inc., registered in the United States and other countries.