Cleanup for theme picker
- Remove the ThemePreviewPage and related layout/dimens.
- Remove the v2 suffix, they are the v1 now.
Test: Build and run successfully
Bug: 151285476
Change-Id: Ie79b8676c3f28cbec77c04db65c16445276a3345
diff --git a/res/layout/fragment_custom_theme_name.xml b/res/layout/fragment_custom_theme_name.xml
index f5dfd42..27a8f19 100644
--- a/res/layout/fragment_custom_theme_name.xml
+++ b/res/layout/fragment_custom_theme_name.xml
@@ -43,7 +43,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0">
- <include layout="@layout/theme_preview_card_v2"/>
+ <include layout="@layout/theme_preview_card"/>
</FrameLayout>
<androidx.constraintlayout.widget.Guideline
diff --git a/res/layout/fragment_theme_full_preview.xml b/res/layout/fragment_theme_full_preview.xml
index 7573c5b..008a795 100644
--- a/res/layout/fragment_theme_full_preview.xml
+++ b/res/layout/fragment_theme_full_preview.xml
@@ -31,6 +31,6 @@
android:clipToPadding="false"
android:background="@color/fullscreen_preview_background">
- <include layout="@layout/theme_preview_card_v2"/>
+ <include layout="@layout/theme_preview_card"/>
</FrameLayout>
</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/fragment_theme_picker.xml b/res/layout/fragment_theme_picker.xml
index c61c389..a773207 100644
--- a/res/layout/fragment_theme_picker.xml
+++ b/res/layout/fragment_theme_picker.xml
@@ -46,7 +46,7 @@
app:layout_constraintHeight_max="@dimen/preview_pager_max_height"
app:layout_constraintVertical_bias="0.0"
app:layout_constraintHeight_percent="@dimen/preview_pager_maximum_height_ratio">
- <include layout="@layout/theme_preview_card_v2"/>
+ <include layout="@layout/theme_preview_card"/>
</FrameLayout>
<androidx.recyclerview.widget.RecyclerView
diff --git a/res/layout/preview_card_cover_content.xml b/res/layout/preview_card_cover_content.xml
deleted file mode 100644
index 3ab13a4..0000000
--- a/res/layout/preview_card_cover_content.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 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.
--->
-<RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center"
- android:layout_marginHorizontal="@dimen/preview_theme_cover_content_extra_margin"
- android:gravity="center_horizontal"
- android:clipChildren="false"
- tools:showIn="@layout/theme_preview_card">
- <FrameLayout
- android:layout_width="@dimen/preview_theme_icon_size"
- android:layout_height="@dimen/preview_theme_icon_size"
- android:layout_marginLeft="6dp"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true">
- <ImageView
- android:layout_width="@dimen/preview_theme_icon_size"
- android:layout_height="@dimen/preview_theme_icon_size"
- android:id="@+id/preview_color_qs_0_bg"/>
- <ImageView
- android:layout_width="@dimen/preview_theme_tile_size"
- android:layout_height="@dimen/preview_theme_tile_size"
- android:id="@+id/preview_color_qs_0_icon"
- android:tint="@color/tile_enabled_icon_color"
- android:layout_gravity="center"/>
- </FrameLayout>
- <FrameLayout
- android:layout_width="@dimen/preview_theme_icon_size"
- android:layout_height="@dimen/preview_theme_icon_size"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true"
- android:layout_gravity="center_horizontal">
- <ImageView
- android:layout_width="@dimen/preview_theme_icon_size"
- android:layout_height="@dimen/preview_theme_icon_size"
- android:layout_gravity="center"
- android:id="@+id/preview_color_qs_1_bg"/>
- <ImageView
- android:layout_width="@dimen/preview_theme_tile_size"
- android:layout_height="@dimen/preview_theme_tile_size"
- android:id="@+id/preview_color_qs_1_icon"
- android:tint="@color/tile_enabled_icon_color"
- android:layout_gravity="center"/>
- </FrameLayout>
- <FrameLayout
- android:layout_width="@dimen/preview_theme_icon_size"
- android:layout_height="@dimen/preview_theme_icon_size"
- android:layout_marginRight="6dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true">
- <ImageView
- android:layout_width="@dimen/preview_theme_icon_size"
- android:layout_height="@dimen/preview_theme_icon_size"
- android:id="@+id/preview_color_qs_2_bg"/>
- <ImageView
- android:layout_width="@dimen/preview_theme_tile_size"
- android:layout_height="@dimen/preview_theme_tile_size"
- android:id="@+id/preview_color_qs_2_icon"
- android:tint="@color/tile_enabled_icon_color"
- android:layout_gravity="center"/>
- </FrameLayout>
-
- <ImageView
- android:id="@+id/shape_preview_icon_0"
- android:layout_width="@dimen/preview_theme_shape_size"
- android:layout_height="@dimen/preview_theme_shape_size"
- android:layout_marginVertical="4dp"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:elevation="4dp"/>
- <FrameLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_centerHorizontal="true">
- <ImageView
- android:id="@+id/shape_preview_icon_1"
- android:layout_width="@dimen/preview_theme_shape_size"
- android:layout_height="@dimen/preview_theme_shape_size"
- android:layout_gravity="center_horizontal"
- android:layout_marginVertical="4dp"
- android:elevation="4dp"/>
- </FrameLayout>
- <ImageView
- android:id="@+id/shape_preview_icon_2"
- android:layout_width="@dimen/preview_theme_shape_size"
- android:layout_height="@dimen/preview_theme_shape_size"
- android:layout_marginVertical="4dp"
- android:layout_marginRight="2dp"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:elevation="4dp"/>
-
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true">
- <include layout="@layout/theme_cover_qsb"/>
- </FrameLayout>
-</RelativeLayout>
\ No newline at end of file
diff --git a/res/layout/theme_preview_card.xml b/res/layout/theme_preview_card.xml
index f80e846..74d1e68 100644
--- a/res/layout/theme_preview_card.xml
+++ b/res/layout/theme_preview_card.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2019 The Android Open Source Project
+ Copyright (C) 2020 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.
@@ -16,12 +16,24 @@
-->
<androidx.cardview.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- style="@style/PreviewCard"
+ style="@style/FullContentPreviewCard"
android:layout_width="match_parent"
android:layout_height="match_parent"
- app:contentPadding="0dp">
+ android:layout_gravity="center">
- <include layout="@layout/theme_component_preview"/>
+ <ImageView
+ android:id="@+id/wallpaper_preview_image"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/primary_color" />
+
+ <SurfaceView
+ android:id="@+id/wallpaper_preview_surface"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <FrameLayout
+ android:id="@+id/theme_preview_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
</androidx.cardview.widget.CardView>
\ No newline at end of file
diff --git a/res/layout/theme_preview_card_v2.xml b/res/layout/theme_preview_card_v2.xml
deleted file mode 100644
index 74d1e68..0000000
--- a/res/layout/theme_preview_card_v2.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2020 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.
--->
-<androidx.cardview.widget.CardView
- xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/FullContentPreviewCard"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center">
-
- <ImageView
- android:id="@+id/wallpaper_preview_image"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@color/primary_color" />
-
- <SurfaceView
- android:id="@+id/wallpaper_preview_surface"
- android:layout_width="match_parent"
- android:layout_height="match_parent" />
-
- <FrameLayout
- android:id="@+id/theme_preview_container"
- android:layout_width="match_parent"
- android:layout_height="match_parent"/>
-</androidx.cardview.widget.CardView>
\ No newline at end of file
diff --git a/res/layout/theme_preview_content_v2.xml b/res/layout/theme_preview_content.xml
similarity index 100%
rename from res/layout/theme_preview_content_v2.xml
rename to res/layout/theme_preview_content.xml