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:
Jorim Jaggi
2015-07-06 16:18:11 -07:00
parent 9d587a97b9
commit 6d712e06f7
2 changed files with 2 additions and 7 deletions

View File

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

View File

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