Enable new theme picker preveiw
Also add customize button for customize themes.
Screenshot:
- Portrait: https://screenshot.googleplex.com/HWmnWEACFdW.png
- Landscape: https://screenshot.googleplex.com/1NcOQNLoLvE.png
Next: cleanup for res/
Test: Manually
Bug: 146475648
Change-Id: I7624f7404949398dee3782317f0ce0ece8194007
diff --git a/res/layout-land/fragment_theme_picker.xml b/res/layout-land/fragment_theme_picker.xml
index dc30232..915fb47 100644
--- a/res/layout-land/fragment_theme_picker.xml
+++ b/res/layout-land/fragment_theme_picker.xml
@@ -31,39 +31,28 @@
android:layout_height="match_parent"
android:orientation="horizontal">
- <com.android.wallpaper.widget.PreviewPager
- android:id="@+id/theme_preview_pager"
+ <FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@color/secondary_color"/>
- <View
- android:layout_width="1dp"
- android:layout_height="match_parent"
- android:background="@color/divider_color"/>
- <LinearLayout
- android:id="@+id/options_section"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:paddingVertical="10dp"
- android:orientation="vertical">
-
- <androidx.recyclerview.widget.RecyclerView
- android:id="@+id/options_container"
+ android:layout_weight="1">
+ <FrameLayout
+ android:id="@+id/preview_card_container"
android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"/>
+ android:layout_height="@dimen/preview_content_height"
+ android:paddingTop="@dimen/preview_content_padding_top"
+ android:paddingBottom="@dimen/preview_content_padding_bottom"
+ android:clipToPadding="false"
+ android:background="@color/fullscreen_preview_background">
+ <include layout="@layout/theme_preview_card_v2"/>
+ </FrameLayout>
+ </FrameLayout>
- <Button
- android:id="@+id/apply_button"
- style="@style/ActionPrimaryButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="end"
- android:paddingHorizontal="10dp"
- android:text="@string/apply_theme_btn"/>
- </LinearLayout>
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/options_container"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:paddingVertical="10dp" />
</LinearLayout>
<androidx.core.widget.ContentLoadingProgressBar
diff --git a/res/layout/fragment_theme_picker.xml b/res/layout/fragment_theme_picker.xml
index 93606ea..704114f 100644
--- a/res/layout/fragment_theme_picker.xml
+++ b/res/layout/fragment_theme_picker.xml
@@ -32,7 +32,6 @@
android:layout_height="match_parent"
android:orientation="vertical">
- <!-- The V2 preview card. -->
<FrameLayout
android:id="@+id/preview_card_container"
android:layout_width="match_parent"
@@ -40,18 +39,10 @@
android:paddingTop="@dimen/preview_content_padding_top"
android:paddingBottom="@dimen/preview_content_padding_bottom"
android:clipToPadding="false"
- android:background="@color/fullscreen_preview_background"
- android:visibility="gone">
+ android:background="@color/fullscreen_preview_background">
<include layout="@layout/theme_preview_card_v2"/>
</FrameLayout>
- <!-- Will remove it later. -->
- <com.android.wallpaper.widget.PreviewPager
- android:id="@+id/theme_preview_pager"
- android:layout_width="match_parent"
- android:layout_height="@dimen/preview_content_height"
- android:background="@color/preview_pager_background"/>
-
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/options_container"
android:layout_width="match_parent"