Skip to content

Commit

Permalink
Update demo app comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrisvin committed Nov 19, 2019
1 parent f8888f8 commit 82819e1
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ class MainActivity : AppCompatActivity() {
// sometimes the viewpager layouts don't get the touch events
// when said touch events are consumed directly by the viewpager.
// Create an array of LiquidSwipeCPP, one for each layout in the PagerAdapter
val liquidSwipeClipPathProviders = Array(titleArray.count()) {
LiquidSwipeClipPathProvider()
}
//Similar logic can also be applied for your custom FragmentPagerAdapter
// Similar logic can also be applied for your custom FragmentPagerAdapter/FragmentStatePagerAdapter
viewpager.adapter = CustomPagerAdapter(this, liquidSwipeClipPathProviders)
// Listen to onTouch events on the viewpager and update the waveCenterY value of the LiquidSwipeCPPs
viewpager.setOnTouchListener { _, event ->
val waveCenterY = event.y
liquidSwipeClipPathProviders.map {
Expand Down

0 comments on commit 82819e1

Please sign in to comment.