[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
This commit is contained in:
@@ -15,62 +15,52 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:icon="@drawable/ic_devices_other_32dp">
|
||||
|
||||
<ScrollView
|
||||
<LinearLayout
|
||||
style="@style/SudContentFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
style="@style/TextAppearance.SudGlifBody"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="?attr/sudMarginSides"
|
||||
android:layout_marginEnd="?attr/sudMarginSides"
|
||||
android:textAlignment="center"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/wifi_dpp_fragment_header"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/indeterminate_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/wifi_ap_picture_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/wifi_dpp_success"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintTop_toBottomOf="@+id/header"/>
|
||||
android:scaleType="fitCenter"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/choose_different_network"
|
||||
style="@style/SudGlifButton.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wifi_ap_picture_view"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/wifi_dpp_choose_different_network"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
<include
|
||||
layout="@layout/wifi_dpp_fragment_footer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
||||
|
@@ -15,22 +15,27 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:icon="@drawable/ic_wifi_signal_4_32dp">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/SudContentFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/footer">
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/wifi_dpp_fragment_header"/>
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
style="@style/TextAppearance.SudGlifBody"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="?attr/sudMarginSides"
|
||||
android:layout_marginEnd="?attr/sudMarginSides"
|
||||
android:textAlignment="center"/>
|
||||
|
||||
<LinearLayout android:id="@+id/wifi_network_list_container"
|
||||
android:layout_width="match_parent"
|
||||
@@ -38,12 +43,5 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/footer"
|
||||
layout="@layout/wifi_dpp_fragment_footer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
||||
|
@@ -1,43 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2018 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/SudGlifButtonBar">
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_left"
|
||||
style="@style/SudGlifButton.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_right"
|
||||
style="@style/SudGlifButton.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"/>
|
||||
|
||||
</LinearLayout>
|
@@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2018 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/EntityHeader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@dimen/wifi_dpp_fragment_icon_width_height"
|
||||
android:layout_height="@dimen/wifi_dpp_fragment_icon_width_height"
|
||||
android:scaleType="fitCenter"/>
|
||||
|
||||
<!-- Special header icon only for ic_devices_check_circle_green -->
|
||||
<ImageView
|
||||
android:id="@+id/devices_check_circle_green_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_devices_check_circle_green"
|
||||
android:scaleType="fitCenter"/>
|
||||
|
||||
<!-- Add title_summary_container to group content for Talkback -->
|
||||
<LinearLayout
|
||||
android:id="@+id/title_summary_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:focusable="true">
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
style="@style/TextAppearance.EntityHeaderTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:textAlignment="center"
|
||||
android:layout_marginTop="8dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
style="@style/TextAppearance.EntityHeaderSummary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="false"
|
||||
android:gravity="center_horizontal"
|
||||
android:textAlignment="center"
|
||||
android:layout_marginTop="2dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@@ -15,25 +15,34 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
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:icon="@drawable/ic_qrcode_32dp">
|
||||
|
||||
<ScrollView
|
||||
<LinearLayout
|
||||
style="@style/SudContentFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
style="@style/TextAppearance.SudGlifBody"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="?attr/sudMarginSides"
|
||||
android:layout_marginEnd="?attr/sudMarginSides"
|
||||
android:textAlignment="center"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/wifi_dpp_fragment_header"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/qrcode_view"
|
||||
android:layout_width="@dimen/qrcode_size"
|
||||
@@ -50,7 +59,7 @@
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
||||
|
@@ -15,33 +15,33 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:icon="@drawable/ic_scan_32dp">
|
||||
|
||||
<ScrollView
|
||||
<LinearLayout
|
||||
style="@style/SudContentFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
style="@style/TextAppearance.SudGlifBody"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="?attr/sudMarginSides"
|
||||
android:layout_marginEnd="?attr/sudMarginSides"
|
||||
android:textAlignment="center"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<include layout="@layout/wifi_dpp_fragment_header"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/indeterminate_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
style="?android:attr/progressBarStyleHorizontal"/>
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
@@ -59,18 +59,18 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error_message"
|
||||
style="@style/TextAppearance.ErrorText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginStart="?attr/sudMarginSides"
|
||||
android:layout_marginEnd="?attr/sudMarginSides"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?android:attr/colorError"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
||||
|
Reference in New Issue
Block a user