Move PreviewPager related code from ThemePicker/ to WallPaperPicker2/.
Since there's a view pager in the new UI design for wallpaper picker.
Bug: 149374062
Test:
. build/envsetup.sh
tapas WallpaperPicker2 (and ThemePicker/WallpaperPickerGoogleDebug/WallpaperPickerGoogleRelease)
make -j40
Change-Id: I78e12419fb7008653db185d1d341e8659a8764de
diff --git a/res/layout/fragment_clock_picker.xml b/res/layout/fragment_clock_picker.xml
index c51b703..6b9f94c 100644
--- a/res/layout/fragment_clock_picker.xml
+++ b/res/layout/fragment_clock_picker.xml
@@ -32,7 +32,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <com.android.customization.widget.PreviewPager
+ <com.android.wallpaper.widget.PreviewPager
android:id="@+id/clock_preview_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/fragment_clock_scalable_picker.xml b/res/layout/fragment_clock_scalable_picker.xml
index 41ee0f3..db31dc5 100644
--- a/res/layout/fragment_clock_scalable_picker.xml
+++ b/res/layout/fragment_clock_scalable_picker.xml
@@ -29,7 +29,7 @@
android:layout_height="wrap_content"
app:layout_behavior="@string/scalable_container_behavior">
- <com.android.customization.widget.PreviewPager
+ <com.android.wallpaper.widget.PreviewPager
android:id="@+id/clock_preview_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/fragment_grid_picker.xml b/res/layout/fragment_grid_picker.xml
index 099acdf..f664568 100644
--- a/res/layout/fragment_grid_picker.xml
+++ b/res/layout/fragment_grid_picker.xml
@@ -32,7 +32,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <com.android.customization.widget.PreviewPager
+ <com.android.wallpaper.widget.PreviewPager
android:id="@+id/grid_preview_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/fragment_grid_scalable_picker.xml b/res/layout/fragment_grid_scalable_picker.xml
index 14cd503..de44923 100644
--- a/res/layout/fragment_grid_scalable_picker.xml
+++ b/res/layout/fragment_grid_scalable_picker.xml
@@ -29,7 +29,7 @@
android:layout_height="wrap_content"
app:layout_behavior="@string/scalable_container_behavior">
- <com.android.customization.widget.PreviewPager
+ <com.android.wallpaper.widget.PreviewPager
android:id="@+id/grid_preview_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/fragment_theme_picker.xml b/res/layout/fragment_theme_picker.xml
index 42c9817..1de5a3c 100644
--- a/res/layout/fragment_theme_picker.xml
+++ b/res/layout/fragment_theme_picker.xml
@@ -32,7 +32,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <com.android.customization.widget.PreviewPager
+ <com.android.wallpaper.widget.PreviewPager
android:id="@+id/theme_preview_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/fragment_theme_scalable_picker.xml b/res/layout/fragment_theme_scalable_picker.xml
index fd5b5b6..e03df3e 100644
--- a/res/layout/fragment_theme_scalable_picker.xml
+++ b/res/layout/fragment_theme_scalable_picker.xml
@@ -29,7 +29,7 @@
android:layout_height="wrap_content"
app:layout_behavior="@string/scalable_container_behavior">
- <com.android.customization.widget.PreviewPager
+ <com.android.wallpaper.widget.PreviewPager
android:id="@+id/theme_preview_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/preview_pager.xml b/res/layout/preview_pager.xml
deleted file mode 100644
index 43f8fb6..0000000
--- a/res/layout/preview_pager.xml
+++ /dev/null
@@ -1,83 +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"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <androidx.viewpager.widget.ViewPager
- android:id="@+id/preview_viewpager"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"/>
-
- <FrameLayout
- android:id="@+id/indicator_container"
- android:layout_width="match_parent"
- android:layout_height="@dimen/indicator_container_height"
- android:layout_gravity="bottom">
-
- <com.android.customization.widget.PageIndicator
- android:id="@+id/page_indicator"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center" />
-
- <FrameLayout
- android:id="@+id/arrow_previous"
- android:layout_width="@dimen/indicator_arrow_touch_area_size"
- android:layout_height="@dimen/indicator_arrow_touch_area_size"
- android:layout_gravity="center_vertical|left"
- android:layout_marginStart="@dimen/indicator_arrow_container_margin_horizontal"
- android:background="?android:attr/selectableItemBackgroundBorderless"
- android:contentDescription="@string/previous_page_content_description"
- android:visibility="gone"
- tools:ignore="RtlHardcoded">
-
- <ImageView
- android:layout_width="@dimen/indicator_arrow_size"
- android:layout_height="@dimen/indicator_arrow_size"
- android:layout_gravity="center"
- android:contentDescription="@null"
- android:tint="@color/indicator_arrow_color"
- android:src="@drawable/ic_arrow_back_24px" />
- </FrameLayout>
-
- <FrameLayout
- android:id="@+id/arrow_next"
- android:layout_width="@dimen/indicator_arrow_touch_area_size"
- android:layout_height="@dimen/indicator_arrow_touch_area_size"
- android:layout_gravity="center_vertical|right"
- android:layout_marginEnd="@dimen/indicator_arrow_container_margin_horizontal"
- android:background="?android:attr/selectableItemBackgroundBorderless"
- android:contentDescription="@string/next_page_content_description"
- android:visibility="gone"
- tools:ignore="RtlHardcoded">
-
- <ImageView
- android:layout_width="@dimen/indicator_arrow_size"
- android:layout_height="@dimen/indicator_arrow_size"
- android:layout_gravity="center"
- android:contentDescription="@null"
- android:tint="@color/indicator_arrow_color"
- android:src="@drawable/ic_arrow_forward_24px" />
- </FrameLayout>
- </FrameLayout>
-</LinearLayout>
\ No newline at end of file