Giter VIP home page Giter VIP logo

draglayout's Introduction

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,分页加载

使用:

项目已上传jcenter,可以直接使用maven或gradle引用本库。

Maven

<dependency>
  <groupId>com.mosect</groupId>
  <artifactId>DragLayout</artifactId>
  <version>1.0.2</version>
  <type>pom</type>
</dependency>

Gradle

新版:
implementation 'com.mosect:DragLayout:1.0.2'
implementation 'com.mosect:ViewUtils:1.0.5'

旧版:
compile 'com.mosect:DragLayout:1.0.2'
compile 'com.mosect:ViewUtils:1.0.5'

更新记录

1.0.1

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

1.0.2

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

其他:

个人网站:http://www.mosect.com:5207 建设中……
邮箱:[email protected]
QQ:905340954

draglayout's People

Contributors

mosect avatar

Watchers

James Cloos avatar  avatar

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.