GitXplorerGitXplorer
D

SwipeListView

public
6 stars
3 forks
0 issues

Commits

List of commits on branch master.
Unverified
64c962b042c851d4701a4a7b4c07a664c5053e8f

Updated all of the gradle pieces to the latest versions. Added snapshot deployment capability.

DDavidTPate committed 10 years ago
Unverified
7ee778d4f9cb50904f19fd8b25964d1398999dc4

Added list item for reference

DDavidTPate committed 11 years ago
Unverified
d6eabec5a18354d7e24a820afc824b4a74ed6372

Update build and readme some more.

DDavidTPate committed 11 years ago
Unverified
9c0fe8ed28d3626b42d83bc4896fdead1a743da1

Simplify the travis build file.

DDavidTPate committed 11 years ago
Unverified
28c6be8918f42b250c689525eca8472e95ebc385

I'm dumb and forgot to update the Readme...

DDavidTPate committed 11 years ago
Unverified
76f872588506b59cedd158df75c3e5c21fff0c2b

Added first version.

DDavidTPate committed 11 years ago

README

The README file for this repository.

SwipeListView Build Status

SwipeListView is a standalone library that is designed to facilitate using swipe motions in an Android ListView to reveal something behind the item.

For usage instructions please see the website.

Continuous integration is provided by Travis CI.

Gradle

repositories {
    mavenCentral()
}

dependencies {
    compile('com.davidtpate:swipelistview:0.+@aar')
}

Maven

Downloadable .jars can be found on Maven.

You can also depend on the .jar through Maven:

<dependency>
    <groupId>com.davidtpate</groupId>
    <artifactId>swiplistview</artifactId>
    <version>(insert latest version)</version>
</dependency>

Usage

List

<com.davidtpate.swipelistview.SwipeListView
        xmlns:swipeListView="http://schemas.android.com/apk/res-auto"
        android:id="@+id/list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        swipeListView:frontViewId="@+id/front"
        swipeListView:backViewId="@+id/back"
        swipeListView:closeAllWhenScrolling="[true | false]"
        swipeListView:openOnLongPress="[true | false]"
        swipeListView:swipeDirection="[both | left | right]"/>
  • frontViewId - Required - The generated id of the front of the list item.
  • backViewId - Required - The generated id of the back of the list item to be revealed.
  • closeAllWhenScrolling - Optional - Enable/disable closing all currently revealed items when the list is scrolled. Default - true
  • openOnLongPress - Optional - Enable/disable long press revealing and hiding the list item that was long pressed. Default - true
  • swipeDirection - Optional - Enable/disable directional gestures. Setting this to left only allows swiping items left, etc. Default - both

List Item

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:descendantFocusability="blocksDescendants">

    <LinearLayout
        android:id="@+id/back"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        android:visibility="gone">

        <ImageButton
            android:id="@+id/ib_view"
            android:src="@drawable/ic_action_picture"/>

        <ImageButton
            android:id="@+id/ib_save"
            android:src="@drawable/ic_action_save"/>

        <ImageButton
            android:id="@+id/ib_share"
            android:src="@drawable/ic_action_share"/>

        <ImageButton
            android:id="@+id/ib_open"
            android:src="@drawable/ic_action_globe"/>

    </LinearLayout>

    <LinearLayout
        android:id="@+id/front"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal">
        <TextView
            android:id="@+id/tv_text"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:padding="15dp"/>

    </LinearLayout>
</FrameLayout>

Developed By

License

Copyright 2014 David Pate

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.