OSDN Git Service

Avoid bug in LinearLayout measurement
authorAlan Viverette <alanv@google.com>
Fri, 30 Jan 2015 01:21:21 +0000 (17:21 -0800)
committerAlan Viverette <alanv@google.com>
Fri, 30 Jan 2015 01:30:23 +0000 (01:30 +0000)
Reverts to Holo-style layout where the View divider masks the bug.
Uses a 0-height divider to avoid visual changes.

Bug: 19201079
Change-Id: Ib9e701815c57b23d5ba7173f8de553e90e27ed11

core/res/res/layout/dialog_custom_title_material.xml
core/res/res/layout/dialog_title_icons_material.xml
core/res/res/layout/dialog_title_material.xml

index 248a05e..50ed910 100644 (file)
@@ -27,6 +27,8 @@ This is a custom layout for a dialog.
         android:layout_weight="0"
         android:gravity="center_vertical|start"
         style="?attr/windowTitleBackgroundStyle" />
+    <View android:layout_width="match_parent"
+        android:layout_height="0dp" />
     <FrameLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
index 62af096..3866ca7 100644 (file)
@@ -48,6 +48,9 @@ enabled.
             android:layout_marginStart="8dip" />
     </LinearLayout>
 
+    <View android:layout_width="match_parent"
+        android:layout_height="0dp" />
+
     <FrameLayout
         android:layout_width="match_parent" android:layout_height="wrap_content"
         android:layout_weight="1"
index 339d569..1ea7f6e 100644 (file)
@@ -32,6 +32,8 @@ enabled.
         android:paddingStart="?attr/dialogPreferredPadding"
         android:paddingEnd="?attr/dialogPreferredPadding"
         android:paddingTop="@dimen/dialog_padding_top_material" />
+    <View android:layout_width="match_parent"
+        android:layout_height="0dp" />
     <FrameLayout
         android:layout_width="match_parent" android:layout_height="wrap_content"
         android:layout_weight="1"