Creative Drawer with animation using library.
Gif | Screenshot 1 | Screenshot 2 |
---|---|---|
If you are a Maven user you can easily include the library by specifying it as a dependency:
<dependency>
<groupId>com.infideap.drawerbehavior</groupId>
<artifactId>drawer-behavior</artifactId>
<version>1.0.3</version>
<type>pom</type>
</dependency>
dependencies {
implementation 'com.infideap.drawerbehavior:drawer-behavior:1.0.3'
}
if the gradle unable to sync, you may include this line in project level gradle,
repositories {
maven{
url "https://dl.bintray.com/infideap2/Drawer-Behavior"
}
}
Initialize
drawer = (AdvanceDrawerLayout) findViewById(R.id.drawer_layout);
Use custom behavior
drawer.useCustomBehavior(GravityCompat.START); //assign custom behavior for "Left" drawer
drawer.useCustomBehavior(GravityCompat.END); //assign custom behavior for "Right" drawer