OSDN Git Service

Divider and cancel button now show in the dialog picker.
authorAhbong Chang <cwahbong@google.com>
Mon, 20 Aug 2012 03:51:55 +0000 (11:51 +0800)
committerAhbong Chang <cwahbong@google.com>
Mon, 20 Aug 2012 08:28:25 +0000 (16:28 +0800)
The root node of the included gl_root_group is "merge", whose attributes
can not be overriden by any "include" tag since it will be dropped.
All of the children inside gl_root_group have no weight.  This makes
the first object occupy the whole space.  We use a weighted frame layout
to wrap gl_root_group.

Bug: 7016213
Change-Id: I758806848f6af3eff2f7746c6ef949ce639c7f6e

res/layout/dialog_picker.xml

index 4a625a1..ff27c41 100644 (file)
         android:orientation="vertical"
         android:layout_width="match_parent"
         android:layout_height="match_parent">
-    <include layout="@layout/gl_root_group"
+    <FrameLayout
             android:layout_weight="1"
-            android:layout_height="0dp"
-            android:layout_width="match_parent"/>
-    <View android:layout_width="match_parent"
-            android:layout_height="1dp"
-            android:layout_weight="0"
+            android:layout_width="match_parent"
+            android:layout_height="0dp">
+        <include layout="@layout/gl_root_group" />
+    </FrameLayout>
+    <ImageView android:layout_width="match_parent"
+            android:layout_height="wrap_content"
             android:layout_marginLeft="16dp"
             android:layout_marginRight="16dp"
             android:background="?android:attr/dividerHorizontal" />
     <Button style="?android:attr/buttonBarButtonStyle"
             android:id="@+id/cancel"
-            android:layout_weight="0"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:text="@android:string/cancel"