@Override public void onResume() { super.onResume(); if (!mAnimationView.isAnimationRunning()) { mAnimationView.start(); } }
@Override public void onStart() { super.onStart(); // Prepare canvas as full screen wWindow = getDialog().getWindow(); wWindow.setLayout( ScreenUtils.getScreenWidth(getActivity()), ScreenUtils.getScreenHeight(getActivity()) - ScreenUtils.getStatusHeight(getActivity())); wWindow.setGravity(Gravity.CENTER); // Prepare animation if (!mAnimationView.isAnimationPrepared()) { mAnimationView.setInteractionListener(mInteractionListener).prepareAnimation(); } }
@Nullable @Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return mAnimationView.bindView(inflater, container); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setStyle(DialogFragment.STYLE_NO_FRAME, R.style.AnimatedDialog); setCancelable(mAnimationView.isCancelable()); }