Skip to content

Android SwipeDrawer滑动抽屉库,支持上下左右四个方向,打开模式有抽屉、覆盖、固定三种,支持无限嵌套、边缘滑动等,SwipeDrawer还可以用来做下拉刷新,支持ListView、RecyclerView、GridView、ScrollView等。

License

Leaqi/SwipeDrawer

Repository files navigation

SwipeDrawer · Star Fork API JitPack Release License Download Demo Apk

中文 README | English README

Android SwipeDrawer滑动抽屉库,可同时添加上下左右四个方向抽屉布局,抽屉打开模式有抽屉模式、覆盖模式、固定模式三种,支持无限嵌套,支持边缘滑动打开等,SwipeDrawer还可以当做下拉刷新布局使用,支持ListView、RecyclerView、GridView、ScrollView等。

中文:

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

English:

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

开始使用

添加 jitpack 仓库地址:

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

添加 SwipeDrawer 依赖:

dependencies {
    ...
    implementation 'cn.Leaqi:SwipeDrawer:1.6'
}

在布局文件中加入 SwipeDrawer

<cn.leaqi.drawer.SwipeDrawer
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:leftLayout="@+id/leftDrawer">

    <!-- leftLayout属性指定Left布局 -->
    <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>

    <!-- 默认第一个未指定ID的布局为主布局 -->
    <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>

图片预览 · 查看更多

Demo Demo Demo Demo

License

Apache-2.0 License

Copyright (c) 2022 Leaqi

About

Android SwipeDrawer滑动抽屉库,支持上下左右四个方向,打开模式有抽屉、覆盖、固定三种,支持无限嵌套、边缘滑动等,SwipeDrawer还可以用来做下拉刷新,支持ListView、RecyclerView、GridView、ScrollView等。

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages