Commit 747125f3 authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

[AW][Dev-UI] adjust padding for consistency

No change to logic. This adjusts padding and margins for consistency
with the crash UI (most stuff should be 8dp now).

This also splits the warning message into its own layout file. This will
be necessary for a follow-up change to move the warning text into the
ListView so it can be scrolled off screen.

Bug: 1111172
Test: Manual
Change-Id: I8bf87c633ec6fc8cc0aa85f581e9825c6a9dff2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2330291Reviewed-by: default avatarHazem Ashmawy <hazems@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795047}
parent bc0ebe97
...@@ -140,6 +140,7 @@ android_resources("devui_resources") { ...@@ -140,6 +140,7 @@ android_resources("devui_resources") {
"java/res_devui/layout/crashes_list_item_body.xml", "java/res_devui/layout/crashes_list_item_body.xml",
"java/res_devui/layout/crashes_list_item_header.xml", "java/res_devui/layout/crashes_list_item_header.xml",
"java/res_devui/layout/flag_states.xml", "java/res_devui/layout/flag_states.xml",
"java/res_devui/layout/flag_ui_warning.xml",
"java/res_devui/layout/fragment_crashes_list.xml", "java/res_devui/layout/fragment_crashes_list.xml",
"java/res_devui/layout/fragment_flags.xml", "java/res_devui/layout/fragment_flags.xml",
"java/res_devui/layout/fragment_home.xml", "java/res_devui/layout/fragment_home.xml",
......
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2020 The Chromium Authors. All rights reserved. Use of this
source code is governed by a BSD-style license that can be found in the
LICENSE file.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/flag_ui_warning"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingBottom="8dp">
<!--suppress HardcodedText -->
<TextView
android:id="@+id/flags_warning"
android:text="WARNING: EXPERIMENTAL FEATURES AHEAD!"
android:textColor="@color/error_red"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:textAppearance="?android:attr/textAppearanceLarge"/>
<TextView
android:id="@+id/flags_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"/>
</LinearLayout>
...@@ -11,26 +11,13 @@ ...@@ -11,26 +11,13 @@
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="10dp"> android:paddingStart="8dp"
android:paddingEnd="8dp">
<!--suppress HardcodedText --> <include
<TextView layout="@layout/flag_ui_warning"
android:id="@+id/flags_warning"
android:text="WARNING: EXPERIMENTAL FEATURES AHEAD!"
android:textColor="@color/error_red"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:textAppearance="?android:attr/textAppearanceLarge"/>
<TextView
android:id="@+id/flags_description"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"/>
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<!--suppress HardcodedText --> <!--suppress HardcodedText -->
<Button <Button
...@@ -38,7 +25,7 @@ ...@@ -38,7 +25,7 @@
android:id="@+id/reset_flags_button" android:id="@+id/reset_flags_button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="5dp" android:layout_marginBottom="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"/> android:textAppearance="?android:attr/textAppearanceMedium"/>
<!-- horizontal divider --> <!-- horizontal divider -->
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
android:id="@+id/toggleable_flag" android:id="@+id/toggleable_flag"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:orientation="vertical"> android:orientation="vertical">
<!-- A compound drawable will be populated at runtime, but it's OK to configure drawablePadding now. --> <!-- A compound drawable will be populated at runtime, but it's OK to configure drawablePadding now. -->
...@@ -22,8 +21,8 @@ ...@@ -22,8 +21,8 @@
android:textStyle="bold" android:textStyle="bold"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:drawablePadding="4dp" android:drawablePadding="4dp"
android:paddingBottom="2dp" android:paddingTop="8dp"
android:paddingTop="2dp" /> android:paddingBottom="8dp"/>
<TextView <TextView
android:id="@+id/flag_description" android:id="@+id/flag_description"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment