AndroidSwipeLayout README

The project's README from github.com/daimajia/AndroidSwipeLayout. As one markdown file: README.md.

Android Swipe Layout Build Status

![Gitter](https://badges.gitter.im/Join Chat.svg)

Insight.io

This is the brother of AndroidViewHover.

One year ago, I started to make an app named EverMemo with my good friends. The designer gave me a design picture, the design like this:

I found it was pretty hard to achieve this effect, cause you had to be very familiar with the Android Touch System. It was beyond my ability that moment, and I also noticed that there was no such a concept library...

Time passed, finally...as you see right now.

Demo

Download Demo

Before I made this, I actually found some libraries (eg.SwipeListView) that helps developers to integrate swiping with your UI component.

But it only works in ListView, and it has too many issues that they never care. What a pity!

When I start to make this library, I set some goals:

Usage

Step 1

Gradle

dependencies {
    compile 'com.android.support:recyclerview-v7:21.0.0'
    compile 'com.android.support:support-v4:20.+'
    compile "com.daimajia.swipelayout:library:1.2.0@aar"
}

Maven

<dependency>
	<groupId>com.google.android</groupId>
	<artifactId>support-v4</artifactId>
	<version>r6</version>
</dependency>
<dependency>
	<groupId>com.google.android</groupId>
	<artifactId>recyclerview-v7</artifactId>
	<version>21.0.0</version>
</dependency>
<dependency>
    <groupId>com.daimajia.swipelayout</groupId>
    <artifactId>library</artifactId>
    <version>1.2.0</version>
    <type>apklib</type>
</dependency>

Eclipse

AndroidSwipeLayout-v1.1.8.jar

Step 2

Make sure to use the internal adapter instead of your own!

Wiki Usage

Wiki

Go to Wiki

About me

A student in mainland China.

Welcome to offer me an internship. If you have any new idea about this project, feel free to contact me. :smiley:

AndroidSwipeLayout (daimajia/AndroidSwipeLayout)

Searching Database…

这是什么?AndroidSwipeLayout 是一个 Java 库,可以为 Android 视图添加可滑动的交互面板,让用户滑动列表项(或任何视图)来露出下面隐藏的操作。
这是完整的 UI 框架,还是即插即用的控件?它是一个轻量级控件库,而不是框架:你只需把现有视图包裹在 SwipeLayout 中,再接入你的 ListView、GridView 或任何 ViewGroup 即可。
我该如何把它添加到我的 Android 项目中?通过 Gradle 或 Maven 引入;如果你在使用 Eclipse,可以用预编译的 AndroidSwipeLayout-v1.1.8.jar,然后按照 Wiki 把它接入你的布局。
在 ListView 或 GridView 里使用它有什么需要注意的吗?有。在 ListView 或 GridView 中使用滑动项时,你不能继续使用自己的适配器,必须改用库内部的适配器,这样才能正确跟踪滑动状态。
这个库是为谁设计的?面向需要滑动显示界面的 Android(Java)开发者,比如带有隐藏删除或操作按钮的列表行。
面板打开或关闭时,它会提供哪些回调?它提供 onOpen、onClose 和 onUpdate 回调,方便你响应滑动状态的变化;还提供了查询当前隐藏视图显示了多少的方法。
滑动布局可以互相嵌套吗?可以,该库明确支持将滑动布局相互嵌套,以实现更复杂的交互方式。
作者为什么要自己开发,而不直接用 SwipeListView 之类的库?像 SwipeListView 这样的现有库只能在 ListView 中使用,而且存在一些未解决的问题,因此作者开发了一个更通用的库,可以在 ListView、GridView 和任何 ViewGroup 中使用。
Creator
daimajia
Size
0.4 MB
Stars
12.3K
Age
12y
Commits · 90 Days