English README | 中文 README
Android SwipeDrawer sliding drawer library can add up, down, left and right drawer layouts at the same time. There are three drawer opening modes: drawer mode, overlay mode and fixed mode. It supports unlimited nesting and edge sliding opening. Swipedrawer can also be used as a drop-down refresh layout, and supports listview, recyclerview, GridView, Scrollview, etc.
Add jitpack
repositories:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
Add SwipeDrawer
dependencies:
dependencies {
...
implementation 'cn.Leaqi:SwipeDrawer:1.6'
}
Add SwipeDrawer
to the layout file :
<cn.leaqi.drawer.SwipeDrawer
android:layout_width="match_parent"
android:layout_height="match_parent"
app:leftLayout="@+id/leftDrawer">
<!-- The leftLayout property specifies the left layout -->
<LinearLayout
android:id="@+id/leftDrawer"
android:layout_width="200dp"
android:layout_height="match_parent"
android:background="#FF5722">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="Left" />
</LinearLayout>
<!-- By default, the first layout without ID is the main layout -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="Main" />
</RelativeLayout>
</cn.leaqi.drawer.SwipeDrawer>
Copyright (c) 2022 Leaqi