Merge "Allow volume dialog dimensions to be customized."

This commit is contained in:
Anthony Chen
2016-01-27 19:15:54 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 1 deletions

View File

@@ -137,6 +137,8 @@
<dimen name="standard_notification_panel_width">416dp</dimen>
<dimen name="notification_panel_width">@dimen/match_parent</dimen>
<dimen name="volume_dialog_panel_width">@dimen/standard_notification_panel_width</dimen>
<!-- Gravity for the notification panel -->
<integer name="standard_notification_panel_layout_gravity">0x31</integer><!-- top|center_horizontal -->
<integer name="notification_panel_layout_gravity">0x37</integer><!-- fill_horizontal|top -->

View File

@@ -254,7 +254,7 @@ public class VolumeDialog implements TunerService.Tunable {
if (D.BUG) Log.d(TAG, "updateWindowWidth dm.w=" + dm.widthPixels);
int w = dm.widthPixels;
final int max = mContext.getResources()
.getDimensionPixelSize(R.dimen.standard_notification_panel_width);
.getDimensionPixelSize(R.dimen.volume_dialog_panel_width);
if (w > max) {
w = max;
}