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

Commit dd5a984

Browse files
author
Frederik Schweiger
committed
Update README.md
1 parent 9da9170 commit dd5a984

File tree

1 file changed

+30
-23
lines changed

1 file changed

+30
-23
lines changed

README.md

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,6 @@ A simple, customizable and easy to use swipeable view stack for Android.
99
![Demo animation](https://raw.githubusercontent.com/flschweiger/SwipeStack/master/art/demo.gif)
1010
![Demo screen 2](https://raw.githubusercontent.com/flschweiger/SwipeStack/master/art/screen2.png)
1111

12-
## Attributes ##
13-
14-
*All attributes are optional.*
15-
16-
`allowed_swipe_directions` specifies the allowed swipe directions. *Default: both*
17-
18-
`animation_duration` specifies the duration of the animations. *Default: 300ms*
19-
20-
`stack_size` specifies the maximum number of visible views. *Default: 3*
21-
22-
`stack_spacing` specifies the vertical distance between two views. *Default: 12dp*
23-
24-
`stack_rotation` specifies the maximum random ratation (in degrees) of a card on the stack. *Default: 8*
25-
26-
`swipe_rotation` specifies the rotation (in degrees) of the view when it gets swiped left / right. *Default: 15*
27-
28-
`swipe_opacity` specifies the opacity of the view when it gets swiped left / right. *Default: 1.0*
29-
30-
`scale_factor` specifies the scale factor of the views in the stack. *Default: 1.0*
31-
32-
`disable_hw_acceleration` set to `true` disables hardware acceleration. *Default: false*
33-
3412
## QuickStart ##
3513
### Include the Gradle dependency ###
3614

@@ -41,7 +19,7 @@ dependencies {
4119
```
4220

4321
### Use it in your layout file ###
44-
1. Use the `link.fls.swipestack` view in your XML layout file
22+
1. Use the `link.fls.swipestack.SwipeStack` view in your XML layout file
4523
2. Set the parent view's `clipChildren` attribute to `false`
4624

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

11997
That's it!
12098

99+
## Callbacks ##
100+
101+
Currently SwipeStack implements the following callbacks:
102+
103+
- the ` SwipeStackListener ` notifies you when a view was swiped to the left / right or when the stack becomes empty.
104+
- the ` SwipeProgressListener ` notifies you about the progress when the user starts / stops dragging a view around.
105+
106+
## Attributes ##
107+
108+
*All attributes are optional.*
109+
110+
`allowed_swipe_directions` specifies the allowed swipe directions. *Default: both*
111+
112+
`animation_duration` specifies the duration of the animations. *Default: 300ms*
113+
114+
`stack_size` specifies the maximum number of visible views. *Default: 3*
115+
116+
`stack_spacing` specifies the vertical distance between two views. *Default: 12dp*
117+
118+
`stack_rotation` specifies the maximum random ratation (in degrees) of a card on the stack. *Default: 8*
119+
120+
`swipe_rotation` specifies the rotation (in degrees) of the view when it gets swiped left / right. *Default: 15*
121+
122+
`swipe_opacity` specifies the opacity of the view when it gets swiped left / right. *Default: 1.0*
123+
124+
`scale_factor` specifies the scale factor of the views in the stack. *Default: 1.0*
125+
126+
`disable_hw_acceleration` set to `true` disables hardware acceleration. *Default: false*
127+
121128
## Copyright Notice ##
122129
```
123130
Copyright (C) 2016 Frederik Schweiger

0 commit comments

Comments
 (0)