• Stars
    star
    115
  • Rank 305,916 (Top 7 %)
  • Language
    Java
  • License
    GNU General Publi...
  • Created about 11 years ago
  • Updated almost 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A swipeable - auto resizing view group for android

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>

More Repositories

1

rats

Go
40
star
2

android

Golang android library
Go
13
star
3

go-adb

Adb replacement leveraging some nice to haves such as bulk install/uninstall
Go
10
star
4

rats-gradle-plugin

RATS plugin for the android gradle build tools
Groovy
7
star
5

Barstool

A pluggable debug toolbar for android using Square's Dagger library
Java
5
star
6

Vokal-Camera-Fragment

Vokal-Camera-Fragment
Java
3
star
7

Chrome-Delicious-Extension

A complete rework of the chrome extension by sweaterbox on google code
JavaScript
3
star
8

MinecraftRecipeCalculator

A python utility for calculating raw materials for minecraft recipes
Python
3
star
9

Something-Awful

Something Awful browser for Android
Java
2
star
10

FramedImageView

A Framed image view with optional shape rendering
Java
2
star
11

Fudge

A Cpp file generator
C++
2
star
12

Motirr

An Irrlicht Game in early development
C++
2
star
13

vban-homeassistant

Custom Component to sent VBAN commands from Home Assistant
2
star
14

EtherGuide

An android Ethernet Cable making Guide
Java
2
star
15

ActDiroid

Active Directory Manager for android
Java
2
star
16

Bandiclone

Crash Bandiclone is a fanfic remake of Naughty Dog's classic title "Crash Bandicoot" using Panda3d
Python
2
star
17

iPhone4Emu

Iphone Signal Quality Emulator
Java
2
star
18

meteor-codemirror

CodeMirror repackaged for Meteor
JavaScript
2
star
19

TestExperiment

Network Decoupling Experiment for android
Java
2
star
20

osmdroid

A clone of the OpenStreetMaps
Java
2
star
21

Android-Canasta

Android Canasta Game
Java
1
star
22

deliver

a tool for delivering build artifacts
Python
1
star
23

dcpu16-node

A DCPU-16 Node.js module
JavaScript
1
star
24

dotfiles

My Dotfiles
Vim Snippet
1
star
25

chrome-sizer

A Simple Chrome Extension with the Ability to resize a window to predefined sizes
JavaScript
1
star