You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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))
11
11
12
12
## Demo app
13
13
To run the demo project, clone the repository and run it via Android Studio.
@@ -25,7 +25,7 @@ allprojects {
25
25
}
26
26
}
27
27
```
28
-
2. Add the EasyReveal dependency in the build.gradle:
28
+
2. Add the LiquidSwipe dependency in the build.gradle:
## Touch Interactive - Making the LiquidSwipe wave center Y value match the touch Y value
70
70
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`.
73
73
(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)
74
74
75
75
1. In the `Activity`/`Fragment` class containing the `LiquidSwipeViewPager`
@@ -109,9 +109,9 @@ Anyone else with a better solution is welcome to fork and submit a pull request.
109
109
110
110
## Creating custom swipe animations
111
111
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).
113
113
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.
0 commit comments