Disable window animations, so we can start the show animation directly.
Bug:
21335976
Change-Id: I1d25d0ce46b9a068efed0a1561051072cda226a9
lp.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
lp.y = res.getDimensionPixelSize(R.dimen.volume_offset_top);
lp.gravity = Gravity.TOP;
+ lp.windowAnimations = -1;
window.setAttributes(lp);
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
private static final float ANIMATION_SCALE = 1.0f;
private static final int PRE_DISMISS_DELAY = 50;
- private static final int POST_SHOW_DELAY = 200;
private final Dialog mDialog;
private final View mDialogView;
if (D.BUG) Log.d(TAG, "mDialog.onShow");
final int h = mDialogView.getHeight();
mDialogView.setTranslationY(-h);
- mHandler.postDelayed(new Runnable() {
- @Override
- public void run() {
- startShowAnimation();
- }
- }, POST_SHOW_DELAY);
+ startShowAnimation();
}
});
}