From 00c4f7ba652a817f208fb761feb8c6a063da848a Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Thu, 28 Jul 2016 16:30:10 -0700 Subject: Force AlertDialogLayout to have gravity start|top AlertDialogLayout overrides LinearLayout#onMeasure but not onLayout, meaning that some state initialized for the handling of gravity may not be valid in LinearLayout#onLayout. As this is an internal class never used directly by apps, explicitly specify the default gravity of start|top in @layout/alert_dialog_material to avoid this bug. Apps that do things like set gravity in their theme (for whatever reason) could otherwise change its behavior. Bug 30494039 Change-Id: I71a8be1829a7fe24cf7714a3bd5ed732f85eb887 (cherry picked from commit 39e0bf23f50a3de112b232321c5e0a1013af70c7) --- core/res/res/layout/alert_dialog_material.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/core/res/res/layout/alert_dialog_material.xml b/core/res/res/layout/alert_dialog_material.xml index 6d33de6ca307..178505c264a4 100644 --- a/core/res/res/layout/alert_dialog_material.xml +++ b/core/res/res/layout/alert_dialog_material.xml @@ -20,6 +20,7 @@ android:id="@+id/parentPanel" android:layout_width="match_parent" android:layout_height="wrap_content" + android:gravity="start|top" android:orientation="vertical"> -- cgit v1.2.3-59-g8ed1b