A swipeable - auto resizing view group for android

Overview

SwipeableLayout

A swipeable - auto resizing view group for android

Usage

build.gradle

compile 'com.wmbest.widget:swipeable-layout:1.0.+@aar'

-- or --

pom.xml

<dependency>
  <groupId>com.wmbest.widget</groupId>
  <artifactId>swipeable-layout</artifactId>
  <version>1.0.+</version>
  <type>aar</type>
</dependency>

layout.xml

<com.wmbest.widget.SwipeableLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:swipe="http://schemas.android.com/apk/res-auto"
    swipe:frontView="@+id/front"
    swipe:backView="@+id/back"
    swipe:direction="right"
    >
    <View
        android:id="@id/back"
        android:layout_width="match_parent"
        android:layout_height="200dip"
        android:background="#ff00ff00"
        />
    <View
        android:id="@id/front"
        android:layout_width="match_parent"
        android:layout_height="45dip"
        android:background="#ff0000ff"
        />
</com.wmbest.widget.SwipeableLayout>

Attributes

  • frontView - The Swipeable View - required
  • backView - The Background View - required
  • tabView - This View is used to simulate the background view when the frontView is closed but doesn't cover
  • direction - Swipe Direction (Default left)
  • peekSize - Amount to keep from sliding over
  • grabSize - Amount of touch area for swiping closed

Demo

Imgur

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <com.wmbest.widget.SwipeableLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        xmlns:swipe="http://schemas.android.com/apk/res-auto"
        swipe:frontView="@+id/front"
        swipe:backView="@+id/back"
        swipe:direction="right"
        >
        <View
            android:id="@id/back"
            android:layout_width="match_parent"
            android:layout_height="200dip"
            android:background="#ff00ff00"
            />
        <View
            android:id="@id/front"
            android:layout_width="match_parent"
            android:layout_height="45dip"
            android:background="#ff0000ff"
            />
    </com.wmbest.widget.SwipeableLayout>


    <com.wmbest.widget.SwipeableLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dip"
        xmlns:swipe="http://schemas.android.com/apk/res-auto"
        swipe:frontView="@+id/front"
        swipe:backView="@+id/back"
        >
        <TextView
            android:id="@id/back"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="40dip"
            android:background="#ff0000ff"
            android:text="BACK" />
        <TextView
            android:id="@id/front"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#7f00ff00"
            android:text="FRONT" />
    </com.wmbest.widget.SwipeableLayout>


</LinearLayout>
You might also like...
Material Design Search View Layout, now implemented in Google Maps, Dialer, etc

THIS PROJECT IS DEPRECATED Component is not maintained anymore. Implementation of Lollipop+ Dialer and Google Maps. DEMO Add in View Add to your layou

Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.

Draggable Panel DEPRECATED. This project is not maintained anymore. Draggable Panel is an Android library created to build a draggable user interface

Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube New graphic component.
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube New graphic component.

Please switch to DragView, for the best support, thank you DraggablePanel Download allprojects { repositories { ... maven { url 'https://jitp

FixedHeaderTableLayout is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells with scrolling and zooming features. FixedHeaderTableLayout is similar in construction and use as to Android's TableLayout
FixedHeaderTableLayout is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells with scrolling and zooming features. FixedHeaderTableLayout is similar in construction and use as to Android's TableLayout

FixedHeaderTableLayout is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells with scrolling and zooming features. FixedHeaderTableLayout is similar in construction and use as to Android's TableLayout

An Android Layout which has a same function like https://github.com/romaonthego/RESideMenu

ResideLayout An Android Layout which has a same function like https://github.com/romaonthego/RESideMenu. Can be used on Android 1.6(I haven't try it.)

An Android library that help you to build app with swipe back gesture.
An Android library that help you to build app with swipe back gesture.

SwipeBackLayout An Android library that help you to build app with swipe back gesture. Demo Apk GooglePlay Requirement The latest android-support-v4.j

Ultra Pull to Refresh for Android. Support all the views.

Welcome to follow me on GitHub or Twitter GitHub: https://github.com/liaohuqiu Twitter: https://twitter.com/liaohuqiu 中文版文档 Wanna auto-load-more? This

SwipeBack is an android library that can finish a activity by using gesture.
SwipeBack is an android library that can finish a activity by using gesture.

SwipeBack SwipeBack is a android library that can finish a activity by using gesture. You can set the swipe direction,such as left,top,right and botto

Owner
Bill Best
Bill Best
A 3D Layout for Android,When you use it warp other view,it can became a 3D view,一秒让你的view拥有3D效果!

ThreeDLayout A 3D Layout,When you use it warp other view,it can became a 3D view 中文文档 preview USAGE 1.compile library allprojects { repositories {

androidwing 490 Oct 27, 2022
null 2.4k Dec 30, 2022
A wave view of android,can be used as progress bar.

WaveView ![Gitter](https://badges.gitter.im/Join Chat.svg) A wave view of android,can be used as progress bar. Screenshot APK demo.apk What can be use

Kai Wang 1.3k Dec 28, 2022
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.

This project isn't maintained anymore. It is now recommended to use https://github.com/peterLaurence/MapView. MapView is maintained by Peter, one of o

Mike Dunn 1.5k Nov 21, 2022
Android component which presents a dismissible view from the bottom of the screen

BottomSheet BottomSheet is an Android component which presents a dismissible view from the bottom of the screen. BottomSheet can be a useful replaceme

Flipboard 4.5k Dec 28, 2022
Bubble View for Android.

BubbleLayout Bubble View for Android with custom stroke width and color, arrow size, position and direction. BubbleLayout Extends the FrameLayout. Gra

Masayuki Suda 964 Dec 28, 2022
Show triangle view.

TriangleLabelView Show triangle view. How to Use To see how the TriangleLabelView are added to your xml layouts, check the sample project. <jp.shts.an

Shota Saito 877 Dec 6, 2022
VoronoiView is a view (ViewGroup) that allows you to add and display views inside Voronoi diagram regions.

Vorolay VoronoiView is a view (ViewGroup) that allows you to add and display views inside Voronoi diagram regions. [Voronoi diagram] (https://en.wikip

Daniil Jurjev 918 Dec 4, 2022
A library for showing different types of layouts when a list view is empty

Android Empty Layout Please note that this project is not being maintained now. Hopefully a new version will be available soon. A library for showing

Raquib-ul Alam (Kanak) 606 Nov 26, 2022