OSDN Git Service

Remove top panel in alert dialog if empty.
authorMartin Sjolin <martin.sjolin@sonyericsson.com>
Tue, 22 Jun 2010 19:42:11 +0000 (21:42 +0200)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 5 Aug 2011 08:05:37 +0000 (16:05 +0800)
Remove the topPanel in the alert dialog if it is empty and
therefore invisible. This gives the dialog content more space, and it
makes dialog positioning on the screen correct.

Change-Id: I8ffd9bd9b2360b0ad4338c32c21ab69c055d66a0

core/java/com/android/internal/app/AlertController.java

index 81ca912..fefdcea 100644 (file)
@@ -434,6 +434,7 @@ public class AlertController {
                 View titleTemplate = mWindow.findViewById(R.id.title_template);
                 titleTemplate.setVisibility(View.GONE);
                 mIconView.setVisibility(View.GONE);
+                topPanel.setVisibility(View.GONE);
                 hasTitle = false;
             }
         }