我想在ViewPager中制作我的按钮动画。这意味着,如果我从第1页到第2页滑动"下一步"按钮是合约,第二个按钮在它旁边移动。
到目前为止一切顺利。如果我现在快速滑动动画会卡住,它不再可见或只有一半可见。但Button仍然可以点击。@Override public void onPageSelected(int position) { addDotsIndicator(position); switch (position){ case 0: TransitionManager.beginDelayedTransition(transitionContainer, new AutoTransition()); btnSave.setVisibility(View.GONE); break; case 8: TransitionManager.beginDelayedTransition(transitionContainer, new AutoTransition()); btnNext.setVisibility(View.GONE); break; default: TransitionManager.beginDelayedTransition(transitionContainer, new AutoTransition()); btnSave.setVisibility(View.VISIBLE); btnNext.setVisibility(View.VISIBLE); break; } }
有谁知道如何解决这个问题? 或者你有办法做这个动画吗?
Here is a Demo