Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class MainActivity extends AppCompatActivity {
@BindView(R.id.animator_scene)
AnimatorScene scene;
...
private void initPagerListeners() {
ViewPagerAnimatorAdapter animatorAdapter = new ViewPagerAnimatorAdapter(scene.getScene());
viewPager.addOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
super.onPageScrolled(position, positionOffset, positionOffsetPixels);
animatorAdapter.onPageScrolled(position, positionOffset);
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.