Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void _crossfadeViews(final View begin, View end, int duration) {
- _crossfadeRunning = true;
- end.setAlpha(0f);
- end.setVisibility(View.VISIBLE);
- end.animate().alpha(1f).setDuration(duration).setListener(null);
- begin.animate().alpha(0f).setDuration(duration).setListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- begin.setVisibility(View.GONE);
- _crossfadeRunning = false;
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement