@Override public void setData(Mail data) {
this.mail = data;
senderImageView.setImageResource(data.getSender().getImageRes());
senderNameView.setText(data.getSender().getName());
senderMailView.setText(data.getSender().getEmail());
subjectView.setText(data.getSubject());
contentView.setText(data.getText() + data.getText() + data.getText() + data.getText());
starView.setStarred(data.isStarred());
dateView.setText(format.format(data.getDate()));
labelView.setMail(data);
labelView.setVisibility(View.VISIBLE);
replayView.setVisibility(View.VISIBLE);
// Animate only if not restoring
if (!isRestoringViewState()) {
labelView.setAlpha(0f);
labelView.animate().alpha(1f).setDuration(150).start();
PropertyValuesHolder holderX = PropertyValuesHolder.ofFloat("scaleX", 0, 1);
PropertyValuesHolder holderY = PropertyValuesHolder.ofFloat("scaleY", 0, 1);
ObjectAnimator animator = ObjectAnimator.ofPropertyValuesHolder(replayView, holderX, holderY);
animator.setInterpolator(new OvershootInterpolator());
animator.start();
}
}
DetailsFragment.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:GitHub
作者:
评论列表
文章目录