From 8eda83d071f768412f0bcc64d31022ed6ea4b03c Mon Sep 17 00:00:00 2001 From: Arc Wang Date: Mon, 7 Jan 2019 11:51:42 +0800 Subject: [PATCH] Add more Wi-Fi DPP UI features. 1. Use ConstraintLayout to fix footer buttons at bottom 2. ScrollViews have all other UI components excepts footer buttons 3. Use style/SuwGlifButton for buttons 4. Fix scan fragment crash when rotating screen Bug: 118794978 Test: manual test Change-Id: I509b0156c4835c75da75fb7ac4c82f55a0b506a1 --- Android.mk | 2 + .../wifi_dpp_qrcode_scanner_fragment.xml | 51 +++++++++------- res/layout/wifi_dpp_activity.xml | 4 +- res/layout/wifi_dpp_add_device_fragment.xml | 56 +++++++++++------ ...dpp_choose_saved_wifi_network_fragment.xml | 38 ++++++++---- res/layout/wifi_dpp_fragment_footer.xml | 13 ++-- .../wifi_dpp_qrcode_generator_fragment.xml | 27 ++++++--- .../wifi_dpp_qrcode_scanner_fragment.xml | 60 +++++++++++-------- .../wifi/dpp/WifiDppAddDeviceFragment.java | 11 +++- .../dpp/WifiDppQrCodeScannerFragment.java | 19 +++++- tests/robotests/Android.mk | 2 + 11 files changed, 189 insertions(+), 94 deletions(-) diff --git a/Android.mk b/Android.mk index c99e30c58eb..e385b340514 100644 --- a/Android.mk +++ b/Android.mk @@ -23,6 +23,7 @@ LOCAL_USE_AAPT2 := true LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_STATIC_ANDROID_LIBRARIES := \ + androidx-constraintlayout_constraintlayout \ androidx.slice_slice-builders \ androidx.slice_slice-core \ androidx.slice_slice-view \ @@ -40,6 +41,7 @@ LOCAL_JAVA_LIBRARIES := \ ims-common LOCAL_STATIC_JAVA_LIBRARIES := \ + androidx-constraintlayout_constraintlayout-solver \ androidx.lifecycle_lifecycle-runtime \ androidx.lifecycle_lifecycle-extensions \ guava \ diff --git a/res/layout-land/wifi_dpp_qrcode_scanner_fragment.xml b/res/layout-land/wifi_dpp_qrcode_scanner_fragment.xml index 21df686b678..4eed0f64eba 100644 --- a/res/layout-land/wifi_dpp_qrcode_scanner_fragment.xml +++ b/res/layout-land/wifi_dpp_qrcode_scanner_fragment.xml @@ -19,29 +19,40 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root" android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> + android:layout_height="match_parent"> - + - - - - + - + + + + + + + + + + + + diff --git a/res/layout/wifi_dpp_activity.xml b/res/layout/wifi_dpp_activity.xml index 48f2b65ea6c..cb82f661c13 100644 --- a/res/layout/wifi_dpp_activity.xml +++ b/res/layout/wifi_dpp_activity.xml @@ -15,7 +15,7 @@ limitations under the License. --> - - + diff --git a/res/layout/wifi_dpp_add_device_fragment.xml b/res/layout/wifi_dpp_add_device_fragment.xml index 5e70396ae40..2d1ce5b6dcd 100644 --- a/res/layout/wifi_dpp_add_device_fragment.xml +++ b/res/layout/wifi_dpp_add_device_fragment.xml @@ -15,31 +15,49 @@ limitations under the License. --> - + android:layout_height="match_parent"> - - - + android:layout_height="match_parent"> - + + + + + +