@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstance) {
View view = inflater.inflate(R.layout.fragment_sent_feedback, container, false);
ivFeedbackTooth = (ImageView) view.findViewById(R.id.iv_feedback_tooth);
tvFeedbackThankYou = (DCTextView) view.findViewById(R.id.tv_feedback_thank_you);
tvFeedbackMessage = (DCTextView) view.findViewById(R.id.tv_feedback_message);
Resources r = getResources();
float translationPx = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics());
AlphaAnimation logoAnimation = new AlphaAnimation(0, 1);
logoAnimation.setDuration(2000);
ivFeedbackTooth.startAnimation(logoAnimation);
TranslateAnimation thankYouTranslate = new TranslateAnimation(0, 0, translationPx, 0);
thankYouTranslate.setDuration(1000);
AlphaAnimation thankYouAlpha = new AlphaAnimation(0, 1);
thankYouAlpha.setDuration(1000);
AnimationSet thankYouSet = new AnimationSet(true);
thankYouSet.addAnimation(thankYouTranslate);
thankYouSet.addAnimation(thankYouAlpha);
tvFeedbackThankYou.startAnimation(thankYouSet);
AlphaAnimation messageAnimation = new AlphaAnimation(0, 1);
messageAnimation.setDuration(3500);
tvFeedbackMessage.startAnimation(messageAnimation);
runnable = new Runnable() {
@Override
public void run() {
if (getActivity() != null) {
if (listener != null)
listener.onFragmentRemoved();
getActivity().getFragmentManager().beginTransaction().remove(DCSentFeedbackFragment.this).commitAllowingStateLoss();
}
}
};
handler.postDelayed(runnable, 5000);
return view;
}
DCSentFeedbackFragment.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:aftercare-app-android
作者:
评论列表
文章目录