protected void showCurrentWord(String letter) {
currentWord.setText(letter);
if(!isScale){
isScale = true;
ViewPropertyAnimator.animate(currentWord).scaleX(1f)
.setInterpolator(new OvershootInterpolator())
.setDuration(450).start();
ViewPropertyAnimator.animate(currentWord).scaleY(1f)
.setInterpolator(new OvershootInterpolator())
.setDuration(450).start();
}
//先移除之前的任务
handler.removeCallbacksAndMessages(null);
//延时隐藏currentWord
handler.postDelayed(new Runnable() {
@Override
public void run() {
// currentWord.setVisibility(View.INVISIBLE);
ViewPropertyAnimator.animate(currentWord).scaleX(0f).setDuration(450).start();
ViewPropertyAnimator.animate(currentWord).scaleY(0f).setDuration(450).start();
isScale = false;
}
}, 1500);
}
MainActivity.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:fastindex-master
作者:
评论列表
文章目录