Skip to content

Latest commit

 

History

History
66 lines (53 loc) · 4.91 KB

README_en.md

File metadata and controls

66 lines (53 loc) · 4.91 KB

SwipeDrawer · Star Fork API JitPack Release License Download Demo Apk

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.

English:

Click to view Use Docs Click to view Detailed Docs Click to view Picture Preview

中文:

点击查看使用文档 点击查看功能详解 点击查看图片演示

Setup

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>

Picture preview · See More

Demo Demo Demo Demo

License

Apache-2.0 License

Copyright (c) 2022 Leaqi