1 Star 3 Fork 2

Mosect / DragLayout

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

DragLayout

Android拖拽布局,包括以下布局: DragLayout 基础布局类 FlowLayout 可折叠布局,继承DragLayout DragRefreshLayout 拖拽刷新布局,继承DragLayout VerticalRefreshLayout 垂直刷新布局,继承DragRefreshLayout

DragLayout

基础布局类,后面的布局都是继承此类。主要实现了上下左右四边的拖拽。可以继承此布局,改写其四边打开规则。 DragLayout演示

FlowLayout

可折叠布局,优化四边的打开条件,可以实现类似商品详情或者列表ITEM左右拖拽菜单效果(需要改写RecyclerView或者ListView,具体使用方法请看Demo)。

FlowLayout折叠样式1

FlowLayout折叠样式2

FlowLayout列表左右滑动菜单

DragRefreshLayout

拖拽刷新布局,主要用于分页加载或者刷新,但一般不直接使用此类,此类作为分页加载基础类。

VerticalRefreshLayout

垂直刷新布局,继承DragRefreshLayout,实现了分页加载和刷新功能,具体使用方式请看例子。 VerticalRefreshLayout,分页加载

使用:

Gradle

在项目根节点的build.gradle中配置:

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

在需要引入的项目build.gradle中添加

implementation 'com.github.Mosect:DragLayout:1.0.5'

更新记录

1.0.5

  • jcenter更改为jitpack

1.0.4

  • 增加maxScrollTime(xml)
  • 增加touchScrollable属性,表示是否可以触摸滑动视图

1.0.3

  • 修复上次滑动未完成,下次直接打开周边出现瞬间闪屏的问题
  • DragLayout直接继承ViewGroup,不继承FrameLayout
  • 性能优化
  • 修复视图未加载时,调用openTop、openLeft、openRight、openBottom方法导致页面布局错乱问题

1.0.2

  • 优化滑动
  • 移除ParentInterceptTouchHelper,改用ViewUtils库的InterceptTouchHelper

1.0.1

  • 修复DragLayout canScrollHorizontally方法返回不正确问题(此问题会让包含DragLayout的ViewPager不能左滑)

其他:

个人网站:http://www.mosect.com 建设中……
邮箱:zhouliuyang1995@163.com

空文件

简介

Android拖拽控件,支持上下左右滑动、折叠或者嵌套ListView、RecyclerView等 展开 收起
Java
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/mosect/DragLayout.git
git@gitee.com:mosect/DragLayout.git
mosect
DragLayout
DragLayout
master

搜索帮助