Go to file
Peter Cai 7425e3c68c SwipeLayout: Allow childs to deny swipe gesture
When used with ScorllView(or horizontal) inside SwipeLayout, the swipe
gesture may conflict with the scroll action. If use requestDisallowInterceptTouchEvent, the scroll action will be back but the parent ListView's scroll action may be disallowed too.

This patch solved this problem by introducing a "SwipeDenier"
interface whose implementation should return if this swipe event should
be denied. When onInterceptTouchEvent is called, SwipeLayout will call
all SwipeDenier and if one of them returns true, the event will not be
intercepted and passed to child views.

Tested in app: https://github.com/PaperAirplane-Dev-Team/BlackLight
which requires HorizontalScrollView inside SwipeLayout

Signed-off-by: Peter Cai <xqsx43cxy@126.com>
2014-08-29 17:16:53 +08:00
demo add styleable ability 2014-08-28 09:01:19 +08:00
gradle/wrapper Android Swipe Layout born 2014-08-25 12:08:30 +08:00
library SwipeLayout: Allow childs to deny swipe gesture 2014-08-29 17:16:53 +08:00
.gitignore Android Swipe Layout born 2014-08-25 12:08:30 +08:00
LICENSE Initial commit 2014-08-25 12:09:33 +08:00
README.md v1.0.3 2014-08-26 21:51:59 +08:00
build.gradle Android Swipe Layout born 2014-08-25 12:08:30 +08:00
gradle.properties Fix gradle files 2014-08-27 14:10:22 +02:00
gradlew Android Swipe Layout born 2014-08-25 12:08:30 +08:00
gradlew.bat Android Swipe Layout born 2014-08-25 12:08:30 +08:00
settings.gradle Android Swipe Layout born 2014-08-25 12:08:30 +08:00

README.md

Android Swipe Layout

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 they have too much limitation, only in ListView, or some other limitations.

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

  • Can be easily integrated in anywhere, ListView, GridView, ViewGroup etc.
  • Can receive onOpen,onClose,onUpdate callbacks.
  • Can notifiy the hidden children how much they have shown.
  • Can be nested each other.

Usage

Step 1

Gradle

dependencies {
        compile "com.daimajia.swipelayout:library:1.0.3@aar"
}

Maven

<dependency>
    <groupId>com.daimajia.swipelayout</groupId>
    <artifactId>library</artifactId>
    <version>1.0.3</version>
    <type>apklib</type>
</dependency>

Eclipse

AndroidSwipeLayout-v1.0.3.jar

Step 2

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. 😃