Skip to content

Commit 14b8616

Browse files
committed
Fix click event with FlipVerticalTransformer
Credit come to the author of this commit : ToxicBakery@f43fb3b
1 parent b4258ca commit 14b8616

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

library/src/main/java/com/ToxicBakery/viewpager/transforms/FlipVerticalTransformer.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,14 @@ protected void onTransform(View view, float position) {
3030
view.setRotationX(rotation);
3131
}
3232

33+
@Override
34+
protected void onPostTransform(View page, float position) {
35+
super.onPostTransform(page, position);
36+
37+
if (position > -0.5f && position < 0.5f) {
38+
page.setVisibility(View.VISIBLE);
39+
} else {
40+
page.setVisibility(View.INVISIBLE);
41+
}
42+
}
3343
}

0 commit comments

Comments
 (0)