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…

What is this?AndroidSwipeLayout is a Java library that lets you add swipeable, interactive panels to Android views, so users can swipe list items (or any view) to reveal hidden actions underneath.
Is this a full UI framework or a drop-in widget?It is a lightweight widget library, not a framework: you wrap existing views in a SwipeLayout and plug it into your ListView, GridView, or any ViewGroup.
How do I add it to my Android project?Pull it in via Gradle or Maven, or use the precompiled AndroidSwipeLayout-v1.1.8.jar if you are stuck on Eclipse, then follow the Wiki for wiring it into your layout.
Is there a catch when using it inside ListView or GridView?Yes, you can not keep using your own adapter in a ListView or GridView with swipe items; you must switch to the library's internal adapter so it can track swipe state correctly.
Who is this library built for?Android (Java) developers who need swipe-to-reveal UI, like list rows with hidden delete or action buttons.
What callbacks does it give me when a panel opens or closes?It exposes onOpen, onClose, and onUpdate callbacks so you can react to swipe state changes, plus a way to query how much of the hidden view is currently shown.
Can swipe layouts be nested inside each other?Yes, the library explicitly supports nesting swipe layouts inside one another for more complex interaction patterns.
Why did the author build this instead of using something like SwipeListView?Existing libraries such as SwipeListView only worked inside a ListView and had unresolved issues, so the author built a more general library that works in ListView, GridView, and any ViewGroup.
Creator
daimajia
Size
0.4 MB
Stars
12.3K
Age
12y
Commits · 90 Days