GithubHelp home page GithubHelp logo

leaqi / swipedrawer Goto Github PK

View Code? Open in Web Editor NEW
55.0 1.0 13.0 17.17 MB

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

Home Page: https://leaqi.github.io/SwipeDrawer

License: Apache License 2.0

Java 100.00%
android drag drawer java layout swipe view viewgroup swipedrawer

swipedrawer's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.