|
|
|
@ -417,13 +417,13 @@ public class WebViewActivity extends BaseActivity { |
|
|
|
} |
|
|
|
|
|
|
|
currentVideo.clearAnimation(); |
|
|
|
currentVideo.setVisibility(View.VISIBLE); |
|
|
|
currentVideo.animate().cancel(); |
|
|
|
nextVideo.clearAnimation(); |
|
|
|
|
|
|
|
nextVideo.animate().cancel(); |
|
|
|
// 旧视频淡出
|
|
|
|
currentVideo.animate() |
|
|
|
.alpha(0.5f) |
|
|
|
.setDuration(150) |
|
|
|
.setDuration(200) |
|
|
|
.setListener(new Animator.AnimatorListener() { |
|
|
|
@Override |
|
|
|
public void onAnimationStart(Animator animation) { |
|
|
|
@ -446,7 +446,7 @@ public class WebViewActivity extends BaseActivity { |
|
|
|
nextVideo.setVisibility(View.VISIBLE); |
|
|
|
nextVideo.animate() |
|
|
|
.alpha(1f) |
|
|
|
.setDuration(300) |
|
|
|
.setDuration(400) |
|
|
|
.setListener(new Animator.AnimatorListener() { |
|
|
|
@Override |
|
|
|
public void onAnimationStart(Animator animation) { |
|
|
|
@ -461,7 +461,14 @@ public class WebViewActivity extends BaseActivity { |
|
|
|
currentVideo.start(); |
|
|
|
} |
|
|
|
@Override |
|
|
|
public void onAnimationCancel(Animator animation) {} |
|
|
|
public void onAnimationCancel(Animator animation) { |
|
|
|
currentVideo.setVisibility(View.GONE); |
|
|
|
currentVideo.setAlpha(1f); |
|
|
|
currentVideo = nextVideo; |
|
|
|
nextVideo.setVisibility(View.VISIBLE); |
|
|
|
nextVideo.setAlpha(1f); |
|
|
|
nextVideo.start(); |
|
|
|
} |
|
|
|
@Override |
|
|
|
public void onAnimationRepeat(Animator animation) {} |
|
|
|
}); |
|
|
|
|