Drawerlayout
Implement a Material Design drawer widget.
Latest Update Stable Release Release Candidate Beta Release Alpha Release
March 22, 2023 1.2.0 - - -

Declaring dependencies

To add a dependency on DrawerLayout, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

Groovy

dependencies {
    implementation "androidx.drawerlayout:drawerlayout:1.2.0"
}

Kotlin

dependencies {
    implementation("androidx.drawerlayout:drawerlayout:1.2.0")
}

For more information about dependencies, see Add build dependencies.

Feedback

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.2

Version 1.2.0

March 22, 2023

androidx.drawerlayout:drawerlayout:1.2.0 is released. Version 1.2.0 contains these commits.

Important changes since 1.1.0

  • DrawerLayout now integrates with Android 13’s OnBackPressedInvoked APIs to automatically intercept the system back button when the drawer is open. This requires that your app opts into the predictive back gesture.
  • Calling open and close now consistently work even if the drawer is locked. Locking the drawer still prevents users from interacting with the drawer via gestures.

Version 1.2.0-rc01

March 8, 2023

androidx.drawerlayout:drawerlayout:1.2.0-rc01 is released with no changes. Version 1.2.0-rc01 contains these commits.

Version 1.2.0-beta01

February 8, 2023

androidx.drawerlayout:drawerlayout:1.2.0-beta01 is released with no changes. Version 1.2.0-beta01 contains these commits.

Version 1.2.0-alpha01

September 21, 2022

androidx.drawerlayout:drawerlayout:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.

New Features

  • Integrate new OnBackPressedInvoked APIs for Android 13 (0c84661)

Bug Fixes

  • Ensure open() and close() work programmatically when drawer is locked (ae09f6e)

Version 1.1.1

Version 1.1.1

September 2, 2020

androidx.drawerlayout:drawerlayout:1.1.1 is released. Version 1.1.1 contains these commits.

Bug Fixes

  • Fixed an issue where open() and close() would not work when using LOCK_MODE_LOCKED_CLOSED or LOCK_MODE_LOCKED_OPEN. (b/162253907)

Version 1.1.0

Version 1.1.0

June 24, 2020

androidx.drawerlayout:drawerlayout:1.1.0 is released. Version 1.1.0 contains these commits.

Major changes since 1.0.0

  • DrawerLayout now takes into account the size of any gesture navigation insets, expanding the area available to users to long press and swipe to open the drawer when gesture navigation is enabled.
  • DrawerLayout now supports setting a default style using the drawerLayoutStyle theme attribute.
  • DrawerLayout now implements the Openable interface added in CustomView 1.1.0.

Version 1.1.0-rc01

May 20, 2020

androidx.drawerlayout:drawerlayout:1.1.0-rc01 is released with no changes since 1.1.0-beta01. Version 1.1.0-rc01 contains these commits.

Version 1.1.0-beta01

April 1, 2020

androidx.drawerlayout:drawerlayout:1.1.0-beta01 is released with no changes since 1.1.0-alpha04. Version 1.1.0-beta01 contains these commits.

Version 1.1.0-alpha04

March 4, 2020

androidx.drawerlayout:drawerlayout:1.1.0-alpha04 is released. Version 1.1.0-alpha04 contains these commits.

API Changes

Version 1.1.0-alpha03

August 15, 2019

androidx.drawerlayout:drawerlayout:1.1.0-alpha03 is released. The commits included in this version can be found here.

Bug fixes

  • Fixed binary incompatibility with androidx.core:core:1.2.0-alpha03 (b/139103874)

Version 1.1.0-alpha02

June 13, 2019

androidx.drawerlayout:drawerlayout:1.1.0-alpha02 is released. The commits included in this version can be found here.

New features

  • Can now set default style using new drawerLayoutStyle theme attribute.
  • Removed deprecated behavior when used with gesture navigation on Android 10. Drawers are now swiped open using a long press and swipe

Version 1.1.0-alpha01

May 7, 2019

androidx.drawerlayout:drawerlayout:1.1.0-alpha01 is released.

New features

  • Update for Gesture Nav Support: DrawerLayout now sets system gesture exclusion rects to permit swiping drawers open.

Version 1.0.0

Version 1.0.0

September 21, 2018

androidx.drawerlayout:drawerlayout:1.0.0 is released.