Move customization related layout to ThemePicker (2/2)
Test: Manually tested.
Bug: 337941334
Flag: com.android.wallpaper.new_picker_ui_flag
Change-Id: I0a8d40f22d5a7ce0e855a9b14983b918d3c35c92
diff --git a/res/layout/bottom_sheet_clock.xml b/res/layout/bottom_sheet_clock.xml
new file mode 100644
index 0000000..f917d9f
--- /dev/null
+++ b/res/layout/bottom_sheet_clock.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ ~ Copyright (C) 2024 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.
+ -->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="200dp"
+ android:background="#00ff00">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Clock customization bottom sheet"
+ android:layout_gravity="center" />
+</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/bottom_sheet_shortcut.xml b/res/layout/bottom_sheet_shortcut.xml
new file mode 100644
index 0000000..a55c2cc
--- /dev/null
+++ b/res/layout/bottom_sheet_shortcut.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ ~ Copyright (C) 2024 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.
+ -->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/quick_affordance_horizontal_list"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+</FrameLayout>
\ No newline at end of file
diff --git a/src/com/android/wallpaper/customization/ui/util/ThemePickerCustomizationOptionUtil.kt b/src/com/android/wallpaper/customization/ui/util/ThemePickerCustomizationOptionUtil.kt
index c61267c..e8bac6a 100644
--- a/src/com/android/wallpaper/customization/ui/util/ThemePickerCustomizationOptionUtil.kt
+++ b/src/com/android/wallpaper/customization/ui/util/ThemePickerCustomizationOptionUtil.kt
@@ -174,8 +174,8 @@
layoutInflater: LayoutInflater,
): View =
when (option) {
- ThemePickerLockCustomizationOption.CLOCK -> com.android.wallpaper.R.layout.bottom_sheet_clock
- ThemePickerLockCustomizationOption.SHORTCUTS -> com.android.wallpaper.R.layout.bottom_sheet_shortcut
+ ThemePickerLockCustomizationOption.CLOCK -> R.layout.bottom_sheet_clock
+ ThemePickerLockCustomizationOption.SHORTCUTS -> R.layout.bottom_sheet_shortcut
else ->
throw IllegalStateException(
"Customization option $option does not have a bottom sheet view"