private void prepareIconAnimation() {
authenticationText.setAlpha(0.0f);
trustText.setAlpha(0.0f);
dialogView.addOnLayoutChangeListener(new OnLayoutChangeListener() {
@Override
public void onLayoutChange(View view, int i, int i1, int i2, int i3, int i4, int i5, int i6, int i7) {
float halfVerticalPixelDifference = (trustIconFrame.getY() - authenticationIconFrame.getY()) / 2.0f;
authenticationIconFrame.setTranslationY(halfVerticalPixelDifference);
trustIconFrame.setTranslationY(-halfVerticalPixelDifference);
authenticationIconFrame.animate().translationY(0)
.setStartDelay(ICON_ANIM_DELAY)
.setDuration(ICON_ANIM_DURATION)
.setInterpolator(new AccelerateDecelerateInterpolator())
.start();
trustIconFrame.animate().translationY(0)
.setStartDelay(ICON_ANIM_DELAY)
.setDuration(ICON_ANIM_DURATION)
.setInterpolator(new AccelerateDecelerateInterpolator())
.start();
authenticationText.animate().alpha(1.0f).setStartDelay(ICON_ANIM_DELAY + ICON_ANIM_DURATION).start();
trustText.animate().alpha(1.0f).setStartDelay(ICON_ANIM_DELAY + ICON_ANIM_DURATION).start();
view.removeOnLayoutChangeListener(this);
}
});
}
SecurityInfoDialog.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:q-mail
作者:
评论列表
文章目录