I have task to create catalog of items with discrete scrolling (like in viewpager), where part of next item is seen and transition between pages is like next item is coming from background and current item comes to background. I'm using this solution to make next and previous items partially visible. https://gist.github.com/devunwired/8cbe094bb7a783e37ad1 To achieve transition effect I use PageTransformer
mPager.setPageTransformer(false, new ViewPager.PageTransformer() {
@Override
public void transformPage(View page, float position) {
final float normalizedPosition = Math.abs(Math.abs(position) - 1);
page.setScaleX(normalizedPosition / 5 + 0.8f);
page.setScaleY(normalizedPosition / 5 + 0.8f);
}
});
Inside fragments I have buttons and checkboxes and the problem is: when I enter fragment with viewpager - everything is ok. If I scroll to the next item and try pressing something there - view won't be updated (it will be updated only when I start viewpager scrolling). If don't set PageTransformer - everything will work fine. Do you have any idea where the issue can be?