Code Monkey home page Code Monkey 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 Issues

给作者点个赞

项目不仅优秀,而且文档很详细,给使用者很大的帮助。

能否支持抽屉自动隐藏

我现在做法不是很优雅

  1. 在 setOnDrawerSwitch -> onOpen 里开启定时器,超时则关闭抽屉
  2. leftLayout 用自定义的 LinearLayout 类,在 onDispatchTouch 事件中增加一个回调,遇到 ACTION_UP 或者 ACTION_CANCEL 则复位定时器

滚动问题

NestedScrollView 套 recycler。 recycler在往下滑的过程中会和下拉刷新手势有冲突

设置把手问题

你好,我通过1.5版本新加入的app:bottomOffset="50dp"功能设置拖曳把手,一切如预期效果。
但是发现一个问题,就是一个页面如果有多个方向的抽屉,那么在拖曳其他方向时,有把手方向上的抽屉会带着把手一起完全隐藏,就意味着app:bottomOffset="50dp"属性效果失效了,然而点击遮挡层关闭时,是会把把手露出在主页面的。请教请教,谢谢!!!

设置把手handle

您好!请问怎么设置把手handle,用于拖动上下拉之类的

强制手机横屏,view显示异常

手机在竖屏情况下没有问题,但是强制设置手机为横屏情况,这个view就只会显示一半了(可能跟手机的分辨率有关系)

请教个问题

你好,作者,首先感谢你开发了这个好用的第三方库,我在项目中已经使用了,但是遇到一个问题,请教指教一下,业务上,我使用的是单activity+多Fragment,所以activity上放了一个空的FrameLayout,承载着不同的Fragment,所以我在使用你的库改造后,大致下面这样
<cn.leaqi.drawer.SwipeDrawer
android:layout_width="match_parent"
android:layout_height="match_parent"
app:mainLayout="@+id/mainDrawer"
app:topLayout="@+id/topDrawer">

<FrameLayout
    android:id="@+id/topDrawer"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
</FrameLayout>

<FrameLayout
    android:id="@+id/mainDrawer"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
</FrameLayout>

</cn.leaqi.drawer.SwipeDrawer>

首先这个top下拉的页面是一个没有滑动的页面,但是id为main,也就是之前我项目里面的空FrameLayout 里面承载的不同Fragment,有的是一个没有滑动的布局,有的是带有上下滑动的RecycleView,还有水平滑动的RecyclerView, 目前我使用你提供的api,可以做到主页没有滑动和水平滑动的 不会和top的Fragment全屏手势下拉冲突,但是带有垂直Recyclerview的fragment加载进去后,它的上下滑动就被top的手势抢占了, 我看有 mainScroll这个api,但是要指定子View的id,但是我的主页加载的Fragment是动态的,没发写死id
所以这种情况 该怎么处理,谢谢~

默认关闭

大佬,我实在没找到哪里设置默认关闭,都是默认打开的。在onCreate里面调用了closeDrawer(),也没有关闭。

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.