SlidingRootNav
The library is a DrawerLayout-like ViewGroup, where a "drawer" is hidden under the content view, which can be shifted to make the drawer visible. It doesn't provide you with a drawer builder.
Gradle
Add this into your dependencies block.
compile 'com.yarolegovich:sliding-root-nav:1.1.0'
Sample
Please see the sample app for a library usage example.
Wiki
Usage:
- Create your content_view.xml (example) or construct a
View
programatically. - Set the content view (for example, using
setContentView
in your activity). - Create your menu.xml (example) or construct a
View
programatically. - Now you need to inject the menu in your
onCreate
. You can specify transformations of a content view or use the default ones.
API
Transformations
You can specify root transformations using SlidingRootNavBuilder
.
customTransformation
in the above example is a user-created class that implements RootTransformation
interface. For an example, refer to the default transformations.
Menu behavior
Controling the layout
A call to inject()
returns you an interface for controlling the layout.
Callbacks
- Drag progress:
- Drag state changes:
- Compatibility with
DrawerLayout.DrawerListener
: