Skip to content
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederik Schweiger committed Feb 21, 2016
1 parent 9da9170 commit dd5a984
Showing 1 changed file with 30 additions and 23 deletions.
53 changes: 30 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,6 @@ A simple, customizable and easy to use swipeable view stack for Android.
![Demo animation](https://raw.githubusercontent.com/flschweiger/SwipeStack/master/art/demo.gif)
![Demo screen 2](https://raw.githubusercontent.com/flschweiger/SwipeStack/master/art/screen2.png)

## Attributes ##

*All attributes are optional.*

`allowed_swipe_directions` specifies the allowed swipe directions. *Default: both*

`animation_duration` specifies the duration of the animations. *Default: 300ms*

`stack_size` specifies the maximum number of visible views. *Default: 3*

`stack_spacing` specifies the vertical distance between two views. *Default: 12dp*

`stack_rotation` specifies the maximum random ratation (in degrees) of a card on the stack. *Default: 8*

`swipe_rotation` specifies the rotation (in degrees) of the view when it gets swiped left / right. *Default: 15*

`swipe_opacity` specifies the opacity of the view when it gets swiped left / right. *Default: 1.0*

`scale_factor` specifies the scale factor of the views in the stack. *Default: 1.0*

`disable_hw_acceleration` set to `true` disables hardware acceleration. *Default: false*

## QuickStart ##
### Include the Gradle dependency ###

Expand All @@ -41,7 +19,7 @@ dependencies {
```

### Use it in your layout file ###
1. Use the `link.fls.swipestack` view in your XML layout file
1. Use the `link.fls.swipestack.SwipeStack` view in your XML layout file
2. Set the parent view's `clipChildren` attribute to `false`

*Example:*
Expand Down Expand Up @@ -118,6 +96,35 @@ swipeStack.setAdapter(new SwipeStackAdapter(mData));

That's it!

## Callbacks ##

Currently SwipeStack implements the following callbacks:

- the ` SwipeStackListener ` notifies you when a view was swiped to the left / right or when the stack becomes empty.
- the ` SwipeProgressListener ` notifies you about the progress when the user starts / stops dragging a view around.

## Attributes ##

*All attributes are optional.*

`allowed_swipe_directions` specifies the allowed swipe directions. *Default: both*

`animation_duration` specifies the duration of the animations. *Default: 300ms*

`stack_size` specifies the maximum number of visible views. *Default: 3*

`stack_spacing` specifies the vertical distance between two views. *Default: 12dp*

`stack_rotation` specifies the maximum random ratation (in degrees) of a card on the stack. *Default: 8*

`swipe_rotation` specifies the rotation (in degrees) of the view when it gets swiped left / right. *Default: 15*

`swipe_opacity` specifies the opacity of the view when it gets swiped left / right. *Default: 1.0*

`scale_factor` specifies the scale factor of the views in the stack. *Default: 1.0*

`disable_hw_acceleration` set to `true` disables hardware acceleration. *Default: false*

## Copyright Notice ##
```
Copyright (C) 2016 Frederik Schweiger
Expand Down

0 comments on commit dd5a984

Please sign in to comment.