OSDN Git Service

Fix improperly laid out alert dialog title to match UX specs.
authorMichael Kwan <mkwan@google.com>
Fri, 21 Oct 2016 01:36:09 +0000 (18:36 -0700)
committerMichael Kwan <mkwan@google.com>
Fri, 21 Oct 2016 01:39:31 +0000 (18:39 -0700)
Test: visual inspect using ApiDemos

Bug: 32315229
Change-Id: I486edc94c077af49e1235519e158e55833796231

core/res/res/layout-round-watch/alert_dialog_title_material.xml

index e543c9b..aefe28f 100644 (file)
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License
   -->
-<FrameLayout
+<LinearLayout
         xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:gravity="top|center_horizontal"
-        android:minHeight="@dimen/alert_dialog_title_height">
-    <ImageView android:id="@+id/icon"
+        android:orientation="vertical"
+        android:gravity="top|center_horizontal">
+    <FrameLayout
             android:adjustViewBounds="true"
-            android:maxHeight="24dp"
-            android:maxWidth="24dp"
-            android:layout_marginTop="12dp"
-            android:layout_gravity="center_horizontal"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:src="@null" />
+            android:minHeight="@dimen/screen_percentage_15">
+        <ImageView android:id="@+id/icon"
+                android:adjustViewBounds="true"
+                android:maxHeight="24dp"
+                android:maxWidth="24dp"
+                android:layout_marginTop="@dimen/screen_percentage_10"
+                android:layout_marginBottom="8dp"
+                android:layout_gravity="center_horizontal"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:src="@null" />
+    </FrameLayout>
     <TextView android:id="@+id/alertTitle"
             style="?android:attr/windowTitleStyle"
-            android:layout_marginTop="36dp"
             android:layout_marginBottom="8dp"
             android:layout_width="match_parent"
             android:layout_height="wrap_content" />
-</FrameLayout>
+</LinearLayout>