Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. private void _crossfadeViews(final View begin, View end, int duration) {
  2. _crossfadeRunning = true;
  3.  
  4. end.setAlpha(0f);
  5. end.setVisibility(View.VISIBLE);
  6. end.animate().alpha(1f).setDuration(duration).setListener(null);
  7. begin.animate().alpha(0f).setDuration(duration).setListener(new AnimatorListenerAdapter() {
  8. @Override
  9. public void onAnimationEnd(Animator animation) {
  10. begin.setVisibility(View.GONE);
  11. _crossfadeRunning = false;
  12. }
  13. });
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement