@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(); } }