public void showTipViewAndDelayClose(String tip) {
tipView.setText(tip);
Animation mShowAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f,
Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF,
-1.0f, Animation.RELATIVE_TO_SELF, 0.0f);
mShowAction.setDuration(500);
tipView.startAnimation(mShowAction);
tipView.setVisibility(View.VISIBLE);
tipView.postDelayed(new Runnable() {
@Override
public void run() {
Animation mHiddenAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF,
0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF,
-1.0f);
mHiddenAction.setDuration(500);
tipView.startAnimation(mHiddenAction);
tipView.setVisibility(View.GONE);
}
}, 2200);
}
EasyRecyclerView.java 文件源码
java
阅读 41
收藏 0
点赞 0
评论 0
项目:TextReader
作者:
评论列表
文章目录