RepositoryKotlinMYMalaysia
SH

shiburagi/Drawer-Behavior

Drawer behavior is a library that provide an extra behavior on drawer, such as, move view or scaling view's height while drawer on slide.

589stars
103forks
5issues
1views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: drawernavigator

#1 Repository of the month

1
TINIX TRENDING·Topic: drawer-android

#1 Repository of the month

1
TINIX TRENDING·Topic: drawer-layout

#1 Repository of the month

Drawer-Behavior

Android Arsenal fdsfd

Drawer behavior is a library use Android DrawerLayout Support library as Parent Class [Easy to migrate], that provide an extra behavior on drawer, such as, move view or scaling view's height while drawer on slide.

If current project use Android DrawerLayout Support library and kinda boring with the effect. Then, just change the layout code and calling necessary method for animation/effect.

New update

  • Change Card barkground color (Jazcorra-Zero)
  • Support for get color from MaterialShapeDrawable (CamiloDelReal)
  • Fix preview issue
  • Migrate to AndroidX
  • Transparent status bar for scale effect
  • Support RTL

Features

  • New drawer class with 3D effect
  • Card Effect
  • Zoom in & Zoom out effect
  • X-Translation effect

Alt Text

Android 9.0+ support


For Flutter : Drawer-Behavior-Flutter


Buy Me a Coffee at ko-fi.com paypal

Including In Your Project

If you are a Maven user you can easily include the library by specifying it as a dependency:

Maven

Gradle

maven {
    name = "GitHubPackages"
    url = uri("https://maven.pkg.github.com/shiburagi/Drawer-Behavior") // Github Package
    credentials {
	username = "shiburagi"
	password = "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"
    }
}
dependencies {
    implementation 'com.shiburagi.drawerbehavior:drawerbehavior:1.0.13'
}

or, you can include it by download this project and import /drawerbehavior as module.

How to use

Creating the layout

Advance Drawer Layout


<com.infideap.drawerbehavior.AdvanceDrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    android:background="@color/colorWhite"
    tools:openDrawer="start">

    <include
        layout="@layout/app_bar_default"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <android.support.design.widget.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        android:background="@color/colorWhite"
        app:headerLayout="@layout/nav_header_main"
        app:menu="@menu/activity_main_drawer" />

    <android.support.design.widget.NavigationView
        android:id="@+id/nav_view_notification"
        android:background="@color/colorPrimary"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="end"
        android:fitsSystemWindows="false">
        <include layout="@layout/content_notification"/>
    </android.support.design.widget.NavigationView>

</com.infideap.drawerbehavior.AdvanceDrawerLayout>

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 

Card Effect

Alt Text

drawer.setRadius(GravityCompat.START, 25);//set end container's corner radius (dimension)

Advance 3D Drawer Layout


Alt Text

<com.infideap.drawerbehavior.Advance3DDrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    android:background="@color/colorPrimary"
    tools:openDrawer="start">

    <include
        layout="@layout/app_bar_default"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <android.support.design.widget.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        android:theme="@style/ThemeOverlay.AppCompat.Dark"
        android:background="@color/colorPrimary"
        app:headerLayout="@layout/nav_header_main"
        app:menu="@menu/activity_main_drawer" />

    <android.support.design.widget.NavigationView
        android:id="@+id/nav_view_notification"
        android:background="@color/colorPrimary"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="end"
        android:fitsSystemWindows="false">
        <include layout="@layout/content_notification"/>
    </android.support.design.widget.NavigationView>

</com.infideap.drawerbehavior.Advance3DDrawerLayout>

Initialize

drawer = (Advance3DDrawerLayout) findViewById(R.id.drawer_layout);

Use custom behavior

drawer.setViewRotation(GravityCompat.START, 15); // set degree of Y-rotation ( value : 0 -> 45)

Customize

drawer.setViewScale(GravityCompat.START, 0.9f); //set height scale for main view (0f to 1f)
drawer.setViewElevation(GravityCompat.START, 20); //set main view elevation when drawer open (dimension)
drawer.setViewScrimColor(GravityCompat.START, Color.TRANSPARENT); //set drawer overlay coloe (color)
drawer.setDrawerElevation(GravityCompat.START, 20); //set drawer elevation (dimension)
drawer.setContrastThreshold(3); //set maximum of contrast ratio between white text and background color.
drawer.setRadius(GravityCompat.START, 25); //set end container's corner radius (dimension)

Contact

For any enquiries, please send an email to tr32010@gmail.com.

Similar Projects

Discover other similar projects and AI models.

RepositoryKotlin
mikepenz/MaterialDrawer

The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.

11.6k
Nov 23, 2026
RepositoryKotlin
Tapadoo/Alerter

An Android Alerting Library

5.5k
Jul 21, 2023
RepositoryKotlin
mikepenz/Android-Iconics

Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.

5.3k
Aug 20, 2026
RepositoryKotlin
mikepenz/AboutLibraries

AboutLibraries automatically collects all dependencies and licenses of any gradle project (Kotlin MultiPlatform), and provides easy to integrate UI components for Android and Compose Multiplatform environments

4.5k
Nov 30, 2026
RepositoryKotlin
bufferapp/android-clean-architecture-boilerplate

An android boilerplate project using clean architecture

3.7k
May 19, 2023
RepositoryKotlin
enricocid/Music-Player-GO

🎶🎼 Very slim music player 👨‍🎤 100% made in Italy 🍕🌳🌞🍝🌄

1.9k
Jan 4, 2025
RepositoryKotlin
sdex/ActivityManager

Launch any application activity

1.4k
Nov 29, 2026
RepositoryKotlin
Mindinventory/minavdrawer

Easy to add different animations into standard NavigationDrawer.

108
Sep 1, 2021
RepositoryJava
android10/Android-CleanArchitecture

This is a sample app that is part of a series of blog posts I have written about how to architect an android application using Uncle Bob's clean architecture approach.

15.5k
Apr 28, 2023