From 8e3c49123dd182f54b75f87b47843b24182aeb46 Mon Sep 17 00:00:00 2001 From: Arc Wang Date: Fri, 3 May 2019 17:38:48 +0800 Subject: [PATCH] [Wi-Fi DPP] Refine Wi-Fi DPP UI layouts with SUW library 1. Use GlifLayout in all fragments 2. Fragments use 32dp icon instead of 48 dp 3. Replace ScrollView & ProgressBar & Header & Footer of original layout with GlifLayout design 4. Remove ActionBar (no more back button on screen top) Bug: 129021867 Test: manual Change-Id: I2fda48cb7f7819b2c8dd85c10d39e1f187463bd8 --- res/drawable/ic_check_circle_green.xml | 4 +- ...=> ic_devices_check_circle_green_32dp.xml} | 10 +-- ...ue_black.xml => ic_devices_other_32dp.xml} | 7 +- res/drawable/ic_qrcode_32dp.xml | 25 ++++++ res/drawable/ic_scan_32dp.xml | 25 ++++++ res/drawable/ic_wifi_signal_4_32dp.xml | 22 ++++++ .../wifi_dpp_qrcode_scanner_fragment.xml | 48 +++++------ res/layout/wifi_dpp_add_device_fragment.xml | 52 +++++------- ...dpp_choose_saved_wifi_network_fragment.xml | 32 ++++---- res/layout/wifi_dpp_fragment_footer.xml | 43 ---------- res/layout/wifi_dpp_fragment_header.xml | 74 ----------------- .../wifi_dpp_qrcode_generator_fragment.xml | 29 ++++--- .../wifi_dpp_qrcode_scanner_fragment.xml | 48 +++++------ res/values/dimens.xml | 3 - .../wifi/dpp/WifiDppAddDeviceFragment.java | 79 +++++++------------ ...WifiDppChooseSavedWifiNetworkFragment.java | 30 ++----- .../wifi/dpp/WifiDppConfiguratorActivity.java | 24 +++--- .../wifi/dpp/WifiDppEnrolleeActivity.java | 28 +++---- .../wifi/dpp/WifiDppQrCodeBaseFragment.java | 74 ++++++++++++----- .../dpp/WifiDppQrCodeGeneratorFragment.java | 19 ++--- .../dpp/WifiDppQrCodeScannerFragment.java | 27 +++---- .../res/values/overlayable_icons_test.xml | 2 +- .../settings/wifi/WifiDialogActivityTest.java | 21 ----- .../dpp/WifiDppConfiguratorActivityTest.java | 63 +++++---------- 24 files changed, 334 insertions(+), 455 deletions(-) rename res/drawable/{ic_devices_check_circle_green.xml => ic_devices_check_circle_green_32dp.xml} (77%) rename res/drawable/{ic_devices_other_opaque_black.xml => ic_devices_other_32dp.xml} (90%) create mode 100644 res/drawable/ic_qrcode_32dp.xml create mode 100644 res/drawable/ic_scan_32dp.xml create mode 100644 res/drawable/ic_wifi_signal_4_32dp.xml delete mode 100644 res/layout/wifi_dpp_fragment_footer.xml delete mode 100644 res/layout/wifi_dpp_fragment_header.xml diff --git a/res/drawable/ic_check_circle_green.xml b/res/drawable/ic_check_circle_green.xml index 214d2cffc30..1c42607de85 100644 --- a/res/drawable/ic_check_circle_green.xml +++ b/res/drawable/ic_check_circle_green.xml @@ -15,8 +15,8 @@ --> diff --git a/res/drawable/ic_devices_other_opaque_black.xml b/res/drawable/ic_devices_other_32dp.xml similarity index 90% rename from res/drawable/ic_devices_other_opaque_black.xml rename to res/drawable/ic_devices_other_32dp.xml index 1b5af2d97dc..0890dea8809 100644 --- a/res/drawable/ic_devices_other_opaque_black.xml +++ b/res/drawable/ic_devices_other_32dp.xml @@ -14,10 +14,11 @@ limitations under the License. --> + android:viewportHeight="24" + android:tint="?android:attr/colorAccent"> diff --git a/res/drawable/ic_qrcode_32dp.xml b/res/drawable/ic_qrcode_32dp.xml new file mode 100644 index 00000000000..512d44e32b8 --- /dev/null +++ b/res/drawable/ic_qrcode_32dp.xml @@ -0,0 +1,25 @@ + + + + diff --git a/res/drawable/ic_scan_32dp.xml b/res/drawable/ic_scan_32dp.xml new file mode 100644 index 00000000000..d1eda4f333d --- /dev/null +++ b/res/drawable/ic_scan_32dp.xml @@ -0,0 +1,25 @@ + + + + diff --git a/res/drawable/ic_wifi_signal_4_32dp.xml b/res/drawable/ic_wifi_signal_4_32dp.xml new file mode 100644 index 00000000000..64de14d3400 --- /dev/null +++ b/res/drawable/ic_wifi_signal_4_32dp.xml @@ -0,0 +1,22 @@ + + + diff --git a/res/layout-land/wifi_dpp_qrcode_scanner_fragment.xml b/res/layout-land/wifi_dpp_qrcode_scanner_fragment.xml index 51c8c96a008..6f8757e19f8 100644 --- a/res/layout-land/wifi_dpp_qrcode_scanner_fragment.xml +++ b/res/layout-land/wifi_dpp_qrcode_scanner_fragment.xml @@ -15,33 +15,33 @@ limitations under the License. --> - + android:layout_height="match_parent" + android:icon="@drawable/ic_scan_32dp"> - + android:layout_height="match_parent" + android:gravity="center_horizontal" + android:orientation="vertical"> + + - - - - + android:gravity="center" + android:orientation="vertical"> - + - + diff --git a/res/layout/wifi_dpp_add_device_fragment.xml b/res/layout/wifi_dpp_add_device_fragment.xml index 3ffdeef1041..b7232f6ab12 100644 --- a/res/layout/wifi_dpp_add_device_fragment.xml +++ b/res/layout/wifi_dpp_add_device_fragment.xml @@ -15,62 +15,52 @@ limitations under the License. --> - + android:layout_height="match_parent" + android:icon="@drawable/ic_devices_other_32dp"> - + android:layout_height="match_parent" + android:gravity="center_horizontal" + android:orientation="vertical"> + + - - - - + android:scaleType="fitCenter"/>