Merge "Revamp SD card UX"

This commit is contained in:
Sayak Dutta
2022-07-30 13:04:25 +00:00
committed by Android (Google) Code Review
22 changed files with 658 additions and 489 deletions

View File

@@ -14,16 +14,16 @@
limitations under the License.
-->
<LinearLayout
<androidx.core.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="wrap_content"
android:fillViewport="true">
<androidx.core.widget.NestedScrollView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/body"
android:layout_width="match_parent"
@@ -35,19 +35,21 @@
android:lineSpacingExtra="@dimen/sud_description_line_spacing_extra"
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body1"
android:textColor="?android:attr/textColorPrimary" />
</androidx.core.widget.NestedScrollView>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="4dp">
<Button
android:id="@+id/confirm"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/storage_menu_format"
android:textColor="@android:color/white"
android:backgroundTint="@color/storage_wizard_button_red" />
</FrameLayout>
android:padding="4dp">
<Button
style="@style/ActionPrimaryButton"
android:id="@+id/confirm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/storage_menu_format_button"
android:textColor="@android:color/white"
android:backgroundTint="@color/storage_wizard_button_red" />
</FrameLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View File

@@ -14,32 +14,52 @@
limitations under the License.
-->
<com.google.android.setupdesign.GlifLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/setup_wizard_layout"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/storage_wizard_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<LinearLayout
style="@style/SudContentFrame"
<com.google.android.setupdesign.GlifLayout
android:id="@+id/setup_wizard_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<TextView
android:id="@+id/storage_wizard_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sud_description_margin_top"
android:lineSpacingExtra="@dimen/sud_description_line_spacing_extra"
android:textColor="?android:attr/textColorPrimary" />
<LinearLayout
style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/storage_wizard_aux"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
<TextView
android:id="@+id/storage_wizard_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sud_description_margin_top"
android:lineSpacingExtra="@dimen/sud_description_line_spacing_extra"
android:textSize="18sp"
android:textColor="?android:attr/textColorSecondary" />
</LinearLayout>
<FrameLayout
android:id="@+id/storage_wizard_aux"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
</com.google.android.setupdesign.GlifLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/setup_completion_margin_top"
android:orientation="vertical"
android:gravity="center_horizontal">
<ImageView
android:id="@+id/storage_wizard_body_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerInside"/>
</LinearLayout>
</LinearLayout>
</com.google.android.setupdesign.GlifLayout>
</RelativeLayout>

View File

@@ -14,124 +14,30 @@
limitations under the License.
-->
<com.google.android.setupdesign.GlifLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/setup_wizard_layout"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/storage_wizard_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<LinearLayout
style="@style/SudContentFrame"
<com.google.android.setupdesign.GlifLayout
android:id="@+id/setup_wizard_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<LinearLayout
style="@style/SudContentFrame"
android:id="@+id/storage_wizard_init"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ViewFlipper
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/viewFlipper">
<include layout = "@layout/storage_wizard_init_external" />
<include layout = "@layout/storage_wizard_init_internal" />
</ViewFlipper>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sud_description_margin_top"
android:orientation="horizontal"
android:gravity="center_vertical">
<ImageView
android:layout_width="144dp"
android:layout_height="144dp"
android:scaleType="centerInside"
android:src="@drawable/ic_storage_wizard_internal" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="@dimen/sud_glif_margin_start"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/sud_description_margin_bottom"
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead"
android:text="@string/storage_wizard_init_v2_internal_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/sud_description_margin_bottom"
android:textColor="?android:attr/textColorSecondary"
android:text="@string/storage_wizard_init_v2_internal_summary" />
<Button
android:id="@+id/storage_wizard_init_internal"
style="@style/SudGlifButton.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/storage_wizard_init_v2_internal_action"
android:onClick="onNavigateInternal" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sud_description_margin_top"
android:orientation="horizontal"
android:gravity="center_vertical">
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1"
android:background="@android:color/black"
android:backgroundTint="?android:attr/textColorTertiary" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="@string/storage_wizard_init_v2_or"
android:textColor="?android:attr/textColorTertiary"
android:textAllCaps="true" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1"
android:background="@android:color/black"
android:backgroundTint="?android:attr/textColorTertiary" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sud_description_margin_top"
android:orientation="horizontal"
android:gravity="center_vertical">
<ImageView
android:layout_width="144dp"
android:layout_height="144dp"
android:scaleType="centerInside"
android:src="@drawable/ic_storage_wizard_external" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="@dimen/sud_glif_margin_start"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/sud_description_margin_bottom"
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead"
android:text="@string/storage_wizard_init_v2_external_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/sud_description_margin_bottom"
android:textColor="?android:attr/textColorSecondary"
android:text="@string/storage_wizard_init_v2_external_summary" />
<Button
android:id="@+id/storage_wizard_init_external"
style="@style/SudGlifButton.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/storage_wizard_init_v2_external_action"
android:onClick="onNavigateExternal" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</com.google.android.setupdesign.GlifLayout>
</com.google.android.setupdesign.GlifLayout>
</RelativeLayout>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 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"
android:layout_marginTop="@dimen/sud_description_margin_top"
android:orientation="vertical">
<TextView
android:id="@+id/storage_wizard_init_external_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:textColor="?android:attr/textColorSecondary"
android:textSize="18sp"
android:text="@string/storage_wizard_init_v2_external_summary" />
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@drawable/ic_storage_wizard_external" />
</LinearLayout>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 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"
android:layout_marginTop="@dimen/sud_description_margin_top"
android:orientation="vertical">
<TextView
android:id="@+id/storage_wizard_init_internal_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:textColor="?android:attr/textColorSecondary"
android:textSize="18sp"
android:text="@string/storage_wizard_init_v2_internal_summary" />
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@drawable/ic_storage_wizard_internal" />
</LinearLayout>

View File

@@ -14,47 +14,55 @@
limitations under the License.
-->
<com.google.android.setupdesign.GlifLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/setup_wizard_layout"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/storage_wizard_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<LinearLayout
style="@style/SudContentFrame"
<com.google.android.setupdesign.GlifLayout
android:id="@+id/setup_wizard_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<ProgressBar
android:id="@+id/storage_wizard_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sud_description_margin_top"
android:indeterminate="false"
style="?android:attr/progressBarStyleHorizontal" />
<TextView
android:id="@+id/storage_wizard_progress_summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lineSpacingExtra="@dimen/sud_description_line_spacing_extra"
android:textColor="?android:attr/textColorSecondary" />
<LinearLayout
style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/storage_wizard_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sud_description_margin_top"
android:lineSpacingExtra="@dimen/sud_description_line_spacing_extra"
android:textColor="?android:attr/textColorPrimary"
android:visibility="gone" />
<ProgressBar
android:id="@+id/storage_wizard_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sud_description_margin_top"
android:indeterminate="false"
style="?android:attr/progressBarStyleHorizontal" />
<TextView
android:id="@+id/storage_wizard_progress_summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lineSpacingExtra="@dimen/sud_description_line_spacing_extra"
android:textSize="18sp"
android:textColor="?android:attr/textColorSecondary" />
<FrameLayout
android:id="@+id/storage_wizard_aux"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
<TextView
android:id="@+id/storage_wizard_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sud_description_margin_top"
android:lineSpacingExtra="@dimen/sud_description_line_spacing_extra"
android:textColor="?android:attr/textColorPrimary"
android:textSize="18sp"
android:visibility="gone" />
</LinearLayout>
<FrameLayout
android:id="@+id/storage_wizard_aux"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
</com.google.android.setupdesign.GlifLayout>
</LinearLayout>
</com.google.android.setupdesign.GlifLayout>
</RelativeLayout>