From f37ea4ef25c78f741912f58acc46a6ee1c4eafca Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Tue, 8 Mar 2022 01:55:06 +0000 Subject: [PATCH] Refresh the buttons CDM dialogs Introduce the vetical view buttons for single-device and self-managed dialog. Also a button with a border for mutiple devices dialog. Additionally added a value-night folder to support dark mode. Test: atest CtsCompanionDeviceManagerCoreTestCases atest CtsCompanionDeviceManagerUiAutomationTestCases atest CtsOsTestCases:CompanionDeviceManagerTest Bug: 216638097 Change-Id: Icb941b30dadd62f4c704f3ddf6a15700e8b6364c --- .../btn_negative_multiple_devices.xml | 25 +++++++ .../res/drawable/btn_negative_top.xml | 22 ++++++ .../res/drawable/btn_positive_bottom.xml | 22 ++++++ .../res/layout/activity_confirmation.xml | 68 ++++++++++--------- .../res/layout/data_transfer_confirmation.xml | 53 +++++++-------- .../res/layout/helper_confirmation.xml | 2 +- .../res/layout/list_item_device.xml | 18 ++--- .../res/values-night/themes.xml | 26 +++++++ .../res/values/styles.xml | 30 ++++++++ .../res/values/themes.xml | 3 +- .../CompanionDeviceActivity.java | 8 ++- 11 files changed, 203 insertions(+), 74 deletions(-) create mode 100644 packages/CompanionDeviceManager/res/drawable/btn_negative_multiple_devices.xml create mode 100644 packages/CompanionDeviceManager/res/drawable/btn_negative_top.xml create mode 100644 packages/CompanionDeviceManager/res/drawable/btn_positive_bottom.xml create mode 100644 packages/CompanionDeviceManager/res/values-night/themes.xml diff --git a/packages/CompanionDeviceManager/res/drawable/btn_negative_multiple_devices.xml b/packages/CompanionDeviceManager/res/drawable/btn_negative_multiple_devices.xml new file mode 100644 index 0000000000000..125fee6282d5f --- /dev/null +++ b/packages/CompanionDeviceManager/res/drawable/btn_negative_multiple_devices.xml @@ -0,0 +1,25 @@ + + + + + + + \ No newline at end of file diff --git a/packages/CompanionDeviceManager/res/drawable/btn_negative_top.xml b/packages/CompanionDeviceManager/res/drawable/btn_negative_top.xml new file mode 100644 index 0000000000000..7df92bb145cb5 --- /dev/null +++ b/packages/CompanionDeviceManager/res/drawable/btn_negative_top.xml @@ -0,0 +1,22 @@ + + + + + + diff --git a/packages/CompanionDeviceManager/res/drawable/btn_positive_bottom.xml b/packages/CompanionDeviceManager/res/drawable/btn_positive_bottom.xml new file mode 100644 index 0000000000000..55e96f6d75123 --- /dev/null +++ b/packages/CompanionDeviceManager/res/drawable/btn_positive_bottom.xml @@ -0,0 +1,22 @@ + + + + + + diff --git a/packages/CompanionDeviceManager/res/layout/activity_confirmation.xml b/packages/CompanionDeviceManager/res/layout/activity_confirmation.xml index 82fe72bee4e49..9e5b1663ff45e 100644 --- a/packages/CompanionDeviceManager/res/layout/activity_confirmation.xml +++ b/packages/CompanionDeviceManager/res/layout/activity_confirmation.xml @@ -23,27 +23,27 @@ + android:id="@+id/title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center" + android:paddingHorizontal="12dp" + style="@*android:style/TextAppearance.Widget.Toolbar.Title"/> + android:id="@+id/summary" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="12dp" + android:layout_marginBottom="12dp" + android:gravity="center" + android:textColor="?android:attr/textColorSecondary" + android:textSize="14sp" /> + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_marginTop="24dp">