Remove volume motion delay
Disable window animations, so we can start the show animation directly. Bug: 21335976 Change-Id: I1d25d0ce46b9a068efed0a1561051072cda226a9
This commit is contained in:
@@ -157,6 +157,7 @@ public class VolumeDialog {
|
||||
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);
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ public class VolumeDialogMotion {
|
||||
|
||||
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;
|
||||
@@ -70,12 +69,7 @@ public class VolumeDialogMotion {
|
||||
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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user