Merge \"Fix padding on round devices for AlertDialogs.\" into nyc-mr1-dev

am: 0cd4addd36

Change-Id: I5287b5cae2d18edc5dc2c5fbc2998c63fadbe583
This commit is contained in:
Michael Kwan
2016-07-19 18:57:11 +00:00
committed by android-build-merger
7 changed files with 39 additions and 14 deletions

View File

@@ -618,7 +618,7 @@ public class AlertController {
}
}
private void setupTitle(ViewGroup topPanel) {
protected void setupTitle(ViewGroup topPanel) {
if (mCustomTitleView != null && mShowTitle) {
// Add the custom title view directly to the topPanel layout
final LayoutParams lp = new LayoutParams(
@@ -701,7 +701,7 @@ public class AlertController {
}
}
private void setupButtons(ViewGroup buttonPanel) {
protected void setupButtons(ViewGroup buttonPanel) {
int BIT_BUTTON_POSITIVE = 1;
int BIT_BUTTON_NEGATIVE = 2;
int BIT_BUTTON_NEUTRAL = 4;

View File

@@ -82,4 +82,20 @@ public class MicroAlertController extends AlertController {
}
}
}
@Override
protected void setupTitle(ViewGroup topPanel) {
super.setupTitle(topPanel);
if (topPanel.getVisibility() == View.GONE) {
topPanel.setVisibility(View.INVISIBLE);
}
}
@Override
protected void setupButtons(ViewGroup buttonPanel) {
super.setupButtons(buttonPanel);
if (buttonPanel.getVisibility() == View.GONE) {
buttonPanel.setVisibility(View.INVISIBLE);
}
}
}