animation listener
mneckoee opened this issue · 1 comments
mneckoee commented
please add an animation listener, so we can call it on start of the animation or end of animation, thank you
Nightonke commented
Em... If you check the source code of WoWo, you will notice that there is no animation. The animation you see is fake because it's not automatic. The offset of the WoWoViewPager is the key of the "animation". So if you wanna detect the state of the animation you mean. Just detect the offset of the WoWoViewPager with the default listener like this:
viewpager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
// detect the offset here.
// don't forget to call the super.onPageScrolled.
}
@Override
public void onPageSelected(int position) {
}
@Override
public void onPageScrollStateChanged(int state) {
}
});