Skip to content

Commit 531b674

Browse files
authored
Update README.md
1 parent 4bd6cec commit 531b674

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
| :-: | :-: |
88
| [Default](#usage) | [Touch Interactive](#touch-interactive---making-the-liquidswipe-wave-center-y-value-match-the-touch-y-value) |
99

10-
LiquidSwipe is a viewpager library that can be used to make awesome onboarding designs. ([Demo apk](https://github.com/Chrisvin/LiquidSwipe/releases/download/1.0/LiquidSwipeDemo.apk))
10+
LiquidSwipe is a viewpager library that can be used to make awesome onboarding designs. ([Default Demo apk](https://github.com/Chrisvin/LiquidSwipe/releases/download/1.1/LiquidSwipeDemo.-.Default.apk)) ([TouchInteractive Demo apk](https://github.com/Chrisvin/LiquidSwipe/releases/download/1.1/LiquidSwipeDemo.-.Touch_Interactive.apk))
1111

1212
## Demo app
1313
To run the demo project, clone the repository and run it via Android Studio.
@@ -25,7 +25,7 @@ allprojects {
2525
}
2626
}
2727
```
28-
2. Add the EasyReveal dependency in the build.gradle:
28+
2. Add the LiquidSwipe dependency in the build.gradle:
2929
```
3030
implementation 'com.github.Chrisvin:LiquidSwipe:1.1'
3131
```
@@ -68,8 +68,8 @@ Note : [Dokka generated documentation on LiquidSwipeLayouts](https://chrisvin.gi
6868

6969
## Touch Interactive - Making the LiquidSwipe wave center Y value match the touch Y value
7070

71-
Rather than have the wave center Y value to always be layout.height/2 , it would be more aesthetically pleasing for it to be the same as the touch Y value.
72-
The following code can be used to dynamically change the waveCenterY based on the touch position on the LiquidSwipeViewPager.
71+
Rather than having the wave center Y value always be layout.height/2 , it would be more aesthetically pleasing for it to be the same as the touch Y value.
72+
The following code can be used to dynamically change the `waveCenterY` based on the touch position on the `LiquidSwipeViewPager`.
7373
(The reason this isn't done internally in the library is because the viewpager layouts don't get the touch events when said touch events are consumed directly by the viewpager)
7474

7575
1. In the `Activity`/`Fragment` class containing the `LiquidSwipeViewPager`
@@ -92,7 +92,7 @@ viewpager.setOnTouchListener { _, event ->
9292
false
9393
}
9494
```
95-
2. In the `PagerAdapter` set to the `LiquidSwipeViewPager`
95+
2. In the `PagerAdapter`
9696
```kotlin
9797
// Set the layout's clipPathProvider to the corresponding `LiquidSwipeClipPathProvider`
9898
(layout as? LiquidSwipeLayout)?.clipPathProvider = liquidSwipeClipPathProviders[position]
@@ -109,9 +109,9 @@ Anyone else with a better solution is welcome to fork and submit a pull request.
109109

110110
## Creating custom swipe animations
111111

112-
The concept for the `ClipPathProvider` in LiquidSwipe is the same as that in the [EasyReveal library](https://github.com/Chrisvin/EasyReveal) (If you haven't already, then you should really check it out, the first version of LiquidSwipe used [EasyReveal](https://github.com/Chrisvin/EasyReveal) as a dependency).
112+
The concept for the `ClipPathProvider` in LiquidSwipe is the same as that in the [EasyReveal library](https://github.com/Chrisvin/EasyReveal) (If you haven't already, then you should really check it out, infact the first version of LiquidSwipe used [EasyReveal](https://github.com/Chrisvin/EasyReveal) as a dependency).
113113

114-
You can create your own swipe animation by extending the [ClipPathProvider](https://github.com/Chrisvin/LiquidSwipe/blob/master/liquidswipe/src/main/java/com/jem/liquidswipe/base/ClipPathProvider.kt) and implementing the `getPath()` method. `getPath()` provides the [Path](https://developer.android.com/reference/android/graphics/Path) for a given *percent* value on the provided *view*. The path gotten from `getPath()` is then used to clip the view using `canvas.clipPath(path, op)` (The `op` value is provided by the `ClipPathProvider` as well).
114+
You can create your own swipe animation by extending the [ClipPathProvider](https://github.com/Chrisvin/LiquidSwipe/blob/master/liquidswipe/src/main/java/com/jem/liquidswipe/base/ClipPathProvider.kt) and implementing the `getPath()` method. `getPath()` provides the [Path](https://developer.android.com/reference/android/graphics/Path) for a given *percent* value on the provided *view*. The path gotten from `getPath()` is then used to clip the view using `canvas.clipPath(path, op)` (The `op` value is provided by the `ClipPathProvider` as well). You can then set your custom [ClipPathProvider](https://github.com/Chrisvin/LiquidSwipe/blob/master/liquidswipe/src/main/java/com/jem/liquidswipe/base/ClipPathProvider.kt) to your layouts.
115115

116116
## API Documentation
117117

0 commit comments

Comments
 (0)