3

Here is my scenario. In a ViewPager i have two fragment. In second Fragment i have a list of item & each item is clickable. I used ViewPager.PageTransformer to animate my ViewPager to go from one fragment to another.

I used this : vPager.setPageTransformer(true, new FlipPageViewTransformer());

where FlipPageViewTransformer is taken from this Depth page transformer.

Now the problem is when I am in first fragment & when i click on it, it takes the second fragment's item click though i am still in first fragment. It is such a weird problem.

Sayem
  • 4,891
  • 3
  • 28
  • 43
  • 1
    try`vPager.setPageTransformer(false, new FlipPageViewTransformer());` First parameter decides the drawing order of pages, so if your front page was drawn first then whatever is drawn after will take focus and click events which will create this unusual effect that you are seeing. – M-Wajeeh Jun 02 '15 at 09:39
  • i did it long time ago. you may try by setting first parameter false as @wajeeh said. If works then let me know – Sayem Jul 28 '15 at 09:54
  • had same problem with os 4.1.1 when using mPager.setPageTransformer(true, new DepthPageTransformer());, on current page clicking on view item but the viewitem on idle page's onclickHandler got called. – lannyf Oct 11 '16 at 18:17
  • @Sayem have you solved it? – Jyoti JK May 15 '18 at 05:32

0 Answers0