
Get the source code for this project here. We’ll then reuse these fragments in a classic master/detail arrangement on tablets. Basically, we will have a master fragment that will be used for the drawer view and a detail fragment for the main view. Additionally, by implementing CodePath’s example, too much of the view logic would live in the hosted activity, so I set out to see if I could use fragments to solve this problem. There are a few ways to accomplish this “always open” behavior on tablets by using DrawerLayout.LOCK_MODE _LOCKED_OPEN, but I found them a bit hacky and inelegant. The navigation drawer is easily implemented with the Design Support Library, and the best walkthrough on how to build a navigation drawer is in this tutorial by CodePath.


In this post, you’ll learn how to reuse fragments to give your tablet and phone users a great experience.

The Android navigation drawer has become a ubiquitous UI feature on Android devices, but it’s usually unnecessary to hide and show on larger devices like tablets. With plenty of screen real estate, the drawer should stay open all the time the Material Design specs even recommend this behavior.
