diff options
| author | George Zacharia <george.zcharia@gmail.com> | 2023-07-02 14:33:47 +0530 |
|---|---|---|
| committer | George Zacharia <george.zcharia@gmail.com> | 2023-07-02 14:33:47 +0530 |
| commit | 913b11dfd2b52e445c773838c766f0d4f8ba0d05 (patch) | |
| tree | adb07f584833593bad6fca5495927c276ceef531 /res/layout | |
| parent | b2d9a4961b3804f79c151630421d480846fd0176 (diff) | |
| parent | cc6f666d7c0bc3b6927f6e9e3c7e46123be6263d (diff) | |
Merge tag 'android-13.0.0_r52' of https://android.googlesource.com/platform/packages/apps/ThemePicker into HEADHEADt13.0
Android 13.0.0 Release 52 (TQ3A.230605.012)
Change-Id: I2cea11fa2f1f02fbd3c9d21cfc1697a79d42a5b7
Diffstat (limited to 'res/layout')
23 files changed, 1325 insertions, 86 deletions
diff --git a/res/layout/clock_carousel.xml b/res/layout/clock_carousel.xml new file mode 100644 index 00000000..35defd61 --- /dev/null +++ b/res/layout/clock_carousel.xml @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2023 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.constraintlayout.motion.widget.MotionLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/motion_container" + android:layout_width="match_parent" + android:layout_height="match_parent" + app:layoutDescription="@xml/carousel_scene"> + + <com.android.wallpaper.picker.DisplayAspectRatioFrameLayout + android:id="@+id/item_view_0" + android:layout_width="@dimen/clock_carousel_item_width" + android:layout_height="@dimen/clock_carousel_item_height" + android:layout_marginEnd="@dimen/clock_carousel_item_margin" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/item_view_1" + app:layout_constraintTop_toTopOf="parent"> + <FrameLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center" /> + </com.android.wallpaper.picker.DisplayAspectRatioFrameLayout> + + <com.android.wallpaper.picker.DisplayAspectRatioFrameLayout + android:id="@+id/item_view_1" + android:layout_width="@dimen/clock_carousel_item_width" + android:layout_height="@dimen/clock_carousel_item_height" + android:layout_marginEnd="@dimen/clock_carousel_item_margin" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/item_view_2" + app:layout_constraintTop_toTopOf="parent" > + <FrameLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center" /> + </com.android.wallpaper.picker.DisplayAspectRatioFrameLayout> + + <com.android.wallpaper.picker.DisplayAspectRatioFrameLayout + android:id="@+id/item_view_2" + android:layout_width="@dimen/clock_carousel_item_width" + android:layout_height="@dimen/clock_carousel_item_height" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + <FrameLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center" /> + </com.android.wallpaper.picker.DisplayAspectRatioFrameLayout> + + <com.android.wallpaper.picker.DisplayAspectRatioFrameLayout + android:id="@+id/item_view_3" + android:layout_width="@dimen/clock_carousel_item_width" + android:layout_height="@dimen/clock_carousel_item_height" + android:layout_marginStart="@dimen/clock_carousel_item_margin" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/item_view_2" + app:layout_constraintTop_toTopOf="parent" > + <FrameLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center" /> + </com.android.wallpaper.picker.DisplayAspectRatioFrameLayout> + + <com.android.wallpaper.picker.DisplayAspectRatioFrameLayout + android:id="@+id/item_view_4" + android:layout_width="@dimen/clock_carousel_item_width" + android:layout_height="@dimen/clock_carousel_item_height" + android:layout_marginStart="@dimen/clock_carousel_item_margin" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/item_view_3" + app:layout_constraintTop_toTopOf="parent" > + <FrameLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center" /> + </com.android.wallpaper.picker.DisplayAspectRatioFrameLayout> + + <androidx.constraintlayout.helper.widget.Carousel + android:id="@+id/carousel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:carousel_backwardTransition="@+id/backward" + app:carousel_firstView="@+id/item_view_2" + app:carousel_forwardTransition="@+id/forward" + app:carousel_infinite="true" + app:carousel_nextState="@+id/next" + app:carousel_previousState="@+id/previous" + app:constraint_referenced_ids="item_view_0,item_view_1,item_view_2,item_view_3,item_view_4" /> + + <!-- The guidelines make sure that only the view in the middle show between the lines --> + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="@dimen/clock_carousel_guideline_margin" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_end" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_end="@dimen/clock_carousel_guideline_margin" /> +</androidx.constraintlayout.motion.widget.MotionLayout>
\ No newline at end of file diff --git a/res/layout/clock_carousel_view.xml b/res/layout/clock_carousel_view.xml new file mode 100644 index 00000000..f1c959ce --- /dev/null +++ b/res/layout/clock_carousel_view.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2023 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. +--> +<com.android.customization.picker.clock.ui.view.ClockCarouselView + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="@dimen/screen_preview_height" />
\ No newline at end of file diff --git a/res/layout/clock_section_view.xml b/res/layout/clock_section_view.xml index 85124980..31f08fc8 100644 --- a/res/layout/clock_section_view.xml +++ b/res/layout/clock_section_view.xml @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. --> -<com.android.customization.picker.clock.ClockSectionView +<com.android.customization.picker.clock.ui.view.ClockSectionView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -33,13 +33,13 @@ <TextView android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/clock_title" + android:text="@string/clock_color_and_size_title" style="@style/SectionTitleTextStyle" /> <TextView + android:id="@+id/selected_clock_color_and_size" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/clock_description" style="@style/SectionSubtitleTextStyle"/> </LinearLayout> @@ -49,7 +49,5 @@ android:scaleType="center" android:src="@drawable/ic_clock_24px" android:background="@drawable/option_border_color" - android:contentDescription="@string/clock_picker_entry_content_description" - android:tint="@color/text_color_primary" /> - -</com.android.customization.picker.clock.ClockSectionView>
\ No newline at end of file + android:contentDescription="@string/clock_picker_entry_content_description" /> +</com.android.customization.picker.clock.ui.view.ClockSectionView>
\ No newline at end of file diff --git a/res/layout/clock_size_radio_button_group.xml b/res/layout/clock_size_radio_button_group.xml new file mode 100644 index 00000000..42640072 --- /dev/null +++ b/res/layout/clock_size_radio_button_group.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ Copyright (C) 2023 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:orientation="vertical"> + + <LinearLayout + android:id="@+id/button_container_dynamic" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + android:orientation="horizontal"> + + <RadioButton + android:id="@+id/radio_button_dynamic" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:layout_marginEnd="8dp" + android:clickable="false" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + style="@style/SectionTitleTextStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/clock_size_dynamic" /> + + <TextView + style="@style/SectionSubtitleTextStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/clock_size_dynamic_description" /> + </LinearLayout> + </LinearLayout> + + <LinearLayout + android:id="@+id/button_container_small" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <RadioButton + android:id="@+id/radio_button_large" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:layout_marginEnd="8dp" + android:clickable="false" /> + + <TextView + style="@style/SectionTitleTextStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:text="@string/clock_size_small" /> + </LinearLayout> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/color_option_2.xml b/res/layout/color_option_2.xml new file mode 100644 index 00000000..2ac0fe6d --- /dev/null +++ b/res/layout/color_option_2.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Copyright (C) 2023 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. +--> +<!-- Content description is set programmatically on the parent FrameLayout --> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + android:clipChildren="false"> + <FrameLayout + android:id="@+id/icon_container" + android:layout_width="@dimen/option_tile_width" + android:layout_height="@dimen/option_tile_width" + android:clipChildren="false"> + + <ImageView + android:id="@id/selection_border" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@drawable/option_item_border" + android:alpha="0" + android:importantForAccessibility="no" /> + + <ImageView + android:id="@id/background" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@drawable/option_item_background" + android:importantForAccessibility="no" /> + + <FrameLayout + android:id="@id/foreground" + android:layout_width="match_parent" + android:layout_height="match_parent"> + <ImageView + android:id="@+id/color_preview_0" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginRight="@dimen/color_seed_chip_margin" + android:layout_marginBottom="@dimen/color_seed_chip_margin" + android:src="@drawable/color_chip_seed_filled0" + android:importantForAccessibility="no"/> + + <ImageView + android:id="@+id/color_preview_1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginLeft="@dimen/color_seed_chip_margin" + android:layout_marginBottom="@dimen/color_seed_chip_margin" + android:src="@drawable/color_chip_seed_filled2" + android:importantForAccessibility="no"/> + + <ImageView + android:id="@+id/color_preview_2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginRight="@dimen/color_seed_chip_margin" + android:layout_marginTop="@dimen/color_seed_chip_margin" + android:src="@drawable/color_chip_seed_filled1" + android:importantForAccessibility="no"/> + + <ImageView + android:id="@+id/color_preview_3" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginLeft="@dimen/color_seed_chip_margin" + android:layout_marginTop="@dimen/color_seed_chip_margin" + android:src="@drawable/color_chip_seed_filled3" + android:importantForAccessibility="no" /> + </FrameLayout> + </FrameLayout> +</LinearLayout> + diff --git a/res/layout/color_option_no_background.xml b/res/layout/color_option_no_background.xml new file mode 100644 index 00000000..b90b4801 --- /dev/null +++ b/res/layout/color_option_no_background.xml @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Copyright (C) 2023 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. +--> +<!-- + This displays the selection outline. It is dynamically sized, constrained remain square and + have a maximum size, and be centered within its parent. Defines a layout_weight of 1, and should + be used with a Linear Layout parent where weightSum is defined. + --> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:clipChildren="false" + android:gravity="center" + android:padding="@dimen/option_tile_grid_tile_padding_min" + android:layout_weight="1" + app:layout_constraintDimensionRatio="1:1" + app:layout_constraintWidth_max="@dimen/component_color_chip_small_diameter_default"> + <!-- + This is the color wheel itself, constrained to a maximum size and centered. The + constraint percentage is sized to leave a padding for the outer selection outline, + proportionate to 2dp for a 40dp color wheel + --> + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/option_tile" + android:layout_width="0dp" + android:layout_height="0dp" + android:layout_gravity="center" + android:gravity="center" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintDimensionRatio="1:1" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintWidth_percent="0.909"> + + <ImageView + android:id="@+id/color_preview_0" + android:layout_width="0dp" + android:layout_height="0dp" + android:adjustViewBounds="true" + android:src="@drawable/color_chip_seed_filled0" + app:layout_constraintHeight_percent=".50" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintWidth_percent=".50" /> + + <ImageView + android:id="@+id/color_preview_1" + android:layout_width="0dp" + android:layout_height="0dp" + android:adjustViewBounds="true" + android:src="@drawable/color_chip_seed_filled2" + app:layout_constraintHeight_percent=".50" + app:layout_constraintLeft_toRightOf="@id/color_preview_0" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintWidth_percent=".50" /> + + <ImageView + android:id="@+id/color_preview_2" + android:layout_width="0dp" + android:layout_height="0dp" + android:adjustViewBounds="true" + android:src="@drawable/color_chip_seed_filled1" + app:layout_constraintHeight_percent=".50" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toBottomOf="@id/color_preview_0" + app:layout_constraintWidth_percent=".50" /> + + <ImageView + android:id="@+id/color_preview_3" + android:layout_width="0dp" + android:layout_height="0dp" + android:adjustViewBounds="true" + android:src="@drawable/color_chip_seed_filled3" + app:layout_constraintHeight_percent=".50" + app:layout_constraintLeft_toRightOf="@id/color_preview_2" + app:layout_constraintTop_toBottomOf="@id/color_preview_1" + app:layout_constraintWidth_percent=".50" /> + </androidx.constraintlayout.widget.ConstraintLayout> + + <ImageView + android:id="@+id/option_selected" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:adjustViewBounds="true" + android:src="@drawable/color_option_selected_no_background" + android:visibility="gone"/> +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/res/layout/color_option_overflow_no_background.xml b/res/layout/color_option_overflow_no_background.xml new file mode 100644 index 00000000..fb25c359 --- /dev/null +++ b/res/layout/color_option_overflow_no_background.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Copyright (C) 2023 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. +--> +<!-- + This is added to keep sizing consistent with the color section options. For the color + section options, this displays the selection outline. + --> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:clipChildren="false" + android:gravity="center" + android:padding="@dimen/option_tile_grid_tile_padding_min" + android:layout_weight="1" + app:layout_constraintDimensionRatio="1:1" + app:layout_constraintWidth_max="@dimen/component_color_chip_small_diameter_default"> + + <!-- + This is added to keep sizing consistent with the color section options. For the color + section options, this is the color wheel itself. + --> + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/option_tile" + android:layout_width="0dp" + android:layout_height="0dp" + android:layout_gravity="center" + android:gravity="center" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintDimensionRatio="1:1" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintWidth_percent="0.909" + android:clipChildren="false"> + + <ImageView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:adjustViewBounds="true" + android:src="@drawable/color_overflow" /> + </androidx.constraintlayout.widget.ConstraintLayout> +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/res/layout/color_option_with_background.xml b/res/layout/color_option_with_background.xml new file mode 100644 index 00000000..36990b5b --- /dev/null +++ b/res/layout/color_option_with_background.xml @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Copyright (C) 2023 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. +--> +<!-- Content description is set programmatically on the parent FrameLayout --> +<!-- TODO (b/272109171): Remove after clock settings is refactored to use OptionItemAdapter --> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" > + <FrameLayout + android:id="@+id/icon_container" + android:layout_width="@dimen/option_item_size" + android:layout_height="@dimen/option_item_size" + android:importantForAccessibility="yes"> + + <ImageView + android:id="@id/selection_border" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@drawable/option_item_border" + android:alpha="0" + android:importantForAccessibility="no" /> + + <ImageView + android:id="@id/background" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@drawable/option_item_background" + android:importantForAccessibility="no" /> + + <ImageView + android:id="@+id/color_preview_0" + android:layout_width="@dimen/component_color_chip_small_radius_default2" + android:layout_height="@dimen/component_color_chip_small_radius_default2" + android:layout_gravity="center" + android:layout_marginRight="@dimen/color_seed_chip_margin2" + android:layout_marginBottom="@dimen/color_seed_chip_margin2" + android:src="@drawable/color_chip_seed_filled0" + android:importantForAccessibility="no"/> + + <ImageView + android:id="@+id/color_preview_1" + android:layout_width="@dimen/component_color_chip_small_radius_default2" + android:layout_height="@dimen/component_color_chip_small_radius_default2" + android:layout_gravity="center" + android:layout_marginLeft="@dimen/color_seed_chip_margin2" + android:layout_marginBottom="@dimen/color_seed_chip_margin2" + android:src="@drawable/color_chip_seed_filled2" + android:importantForAccessibility="no"/> + + <ImageView + android:id="@+id/color_preview_2" + android:layout_width="@dimen/component_color_chip_small_radius_default2" + android:layout_height="@dimen/component_color_chip_small_radius_default2" + android:layout_gravity="center" + android:layout_marginRight="@dimen/color_seed_chip_margin2" + android:layout_marginTop="@dimen/color_seed_chip_margin2" + android:src="@drawable/color_chip_seed_filled1" + android:importantForAccessibility="no"/> + + <ImageView + android:id="@+id/color_preview_3" + android:layout_width="@dimen/component_color_chip_small_radius_default2" + android:layout_height="@dimen/component_color_chip_small_radius_default2" + android:layout_gravity="center" + android:layout_marginLeft="@dimen/color_seed_chip_margin2" + android:layout_marginTop="@dimen/color_seed_chip_margin2" + android:src="@drawable/color_chip_seed_filled3" + android:importantForAccessibility="no"/> + </FrameLayout> + + <TextView + android:id="@+id/option_title" + android:layout_width="@dimen/option_tile_width" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/option_bottom_margin" + android:textColor="@color/text_color_primary" + android:visibility="gone" + android:gravity="center" /> +</LinearLayout> diff --git a/res/layout/color_section_view2.xml b/res/layout/color_section_view2.xml new file mode 100644 index 00000000..687bcef2 --- /dev/null +++ b/res/layout/color_section_view2.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2023 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. +--> +<com.android.customization.picker.color.ui.view.ColorSectionView2 xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/section_bottom_padding" + android:layout_marginHorizontal="@dimen/section_horizontal_padding" + android:orientation="vertical" + android:background="@drawable/top_connected_section_background"> + + <!-- + This is just an invisible placeholder put in place so that the parent keeps its height + stable as the RecyclerView updates from 0 items to N items. Keeping it stable allows the + layout logic to keep the size of the preview container stable as well, which bodes well + for setting up the SurfaceView for remote rendering without changing its size after the + content is loaded into the RecyclerView. + + It's critical for any TextViews inside the included layout to have text. + --> + <LinearLayout + android:id="@+id/color_section_option_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:paddingVertical="24dp" + android:paddingHorizontal="24dp" + android:weightSum="@integer/color_section_num_columns"> + <include + android:layout_width="0dp" + android:layout_height="wrap_content" + layout="@layout/color_option_overflow_no_background" + android:visibility="invisible" + android:layout_weight="1"/> + </LinearLayout> + + <TextView + android:id="@+id/more_colors" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginTop="10dp" + android:minHeight="48dp" + android:gravity="center" + android:drawablePadding="12dp" + android:drawableStart="@drawable/ic_nav_color" + android:drawableTint="@color/text_color_primary" + android:text="@string/more_colors" + android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" + android:textColor="@color/text_color_primary" + android:visibility="gone" + tools:ignore="UseCompatTextViewDrawableXml" /> +</com.android.customization.picker.color.ui.view.ColorSectionView2> diff --git a/res/layout/fragment_clock_carousel_demo.xml b/res/layout/fragment_clock_carousel_demo.xml new file mode 100644 index 00000000..6a54bcb6 --- /dev/null +++ b/res/layout/fragment_clock_carousel_demo.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2023 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:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <FrameLayout + android:id="@+id/section_header_container" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <include layout="@layout/section_header" /> + </FrameLayout> + + <com.android.customization.picker.clock.ui.view.ClockCarouselView + android:id="@+id/image_carousel_view" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/fragment_clock_custom_picker_demo.xml b/res/layout/fragment_clock_custom_picker_demo.xml new file mode 100644 index 00000000..c05c4a89 --- /dev/null +++ b/res/layout/fragment_clock_custom_picker_demo.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + <FrameLayout + android:id="@+id/section_header_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:layout_constraintBottom_toTopOf="@+id/clock_preview_card_list_demo" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + <include layout="@layout/section_header" /> + </FrameLayout> + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/clock_preview_card_list_demo" + android:layout_width="match_parent" + android:layout_height="0dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintTop_toBottomOf="@+id/section_header_container" + android:clipToPadding="false" /> +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/res/layout/fragment_clock_settings.xml b/res/layout/fragment_clock_settings.xml new file mode 100644 index 00000000..52082225 --- /dev/null +++ b/res/layout/fragment_clock_settings.xml @@ -0,0 +1,147 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ Copyright (C) 2023 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="match_parent" + android:orientation="vertical"> + <FrameLayout + android:id="@+id/section_header_container" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <include layout="@layout/section_header" /> + </FrameLayout> + + <com.android.wallpaper.picker.DisplayAspectRatioFrameLayout + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:paddingTop="36dp" + android:paddingBottom="40dp"> + + <include + android:id="@+id/lock_preview" + layout="@layout/wallpaper_preview_card" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center" /> + + <FrameLayout + android:id="@+id/clock_host_view" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center" /> + </com.android.wallpaper.picker.DisplayAspectRatioFrameLayout> + + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_marginHorizontal="24dp" + android:layout_marginBottom="28dp" + android:background="@drawable/picker_fragment_background" + android:paddingTop="22dp" + android:paddingBottom="62dp"> + + <FrameLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/tabs" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:clipToPadding="false" + android:paddingHorizontal="16dp" + android:layout_gravity="center_horizontal" /> + + <!-- + This is just an invisible placeholder put in place so that the parent keeps its height + stable as the RecyclerView updates from 0 items to N items. Keeping it stable allows the + layout logic to keep the size of the preview container stable as well, which bodes well + for setting up the SurfaceView for remote rendering without changing its size after the + content is loaded into the RecyclerView. + + It's critical for any TextViews inside the included layout to have text. + --> + <include + layout="@layout/picker_fragment_tab" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="invisible" /> + </FrameLayout> + + <FrameLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="16dp"> + + <LinearLayout + android:id="@+id/color_picker_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <FrameLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="16dp"> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/color_options" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:clipToPadding="false" + android:paddingHorizontal="16dp" /> + + <!-- + This is just an invisible placeholder put in place so that the parent keeps its + height stable as the RecyclerView updates from 0 items to N items. Keeping it + stable allows the layout logic to keep the size of the preview container stable + as well, which bodes well for setting up the SurfaceView for remote rendering + without changing its size after the content is loaded into the RecyclerView. + --> + <include + layout="@layout/color_option_with_background" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="invisible" /> + </FrameLayout> + + <SeekBar + android:id="@+id/slider" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:minHeight="48dp" + android:thumb="@null" + android:background="@null" + android:paddingHorizontal="16dp" + android:progressDrawable="@drawable/saturation_progress_drawable" + android:splitTrack="false" /> + </LinearLayout> + + <com.android.customization.picker.clock.ui.view.ClockSizeRadioButtonGroup + android:id="@+id/clock_size_radio_button_group" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingHorizontal="16dp" /> + </FrameLayout> + </LinearLayout> +</LinearLayout> diff --git a/res/layout/fragment_color_picker.xml b/res/layout/fragment_color_picker.xml new file mode 100644 index 00000000..7cf94d61 --- /dev/null +++ b/res/layout/fragment_color_picker.xml @@ -0,0 +1,150 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ Copyright (C) 2023 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="match_parent" + android:orientation="vertical"> + + <FrameLayout + android:id="@+id/section_header_container" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <include layout="@layout/section_header" /> + + </FrameLayout> + + <com.android.wallpaper.picker.DisplayAspectRatioLinearLayout + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:layout_marginHorizontal="24dp" + android:paddingTop="20dp" + android:paddingBottom="40dp" + android:orientation="horizontal" + android:gravity="center_vertical"> + + <include + android:id="@+id/lock_preview" + layout="@layout/wallpaper_preview_card" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + + <include + android:id="@+id/home_preview" + layout="@layout/wallpaper_preview_card" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + </com.android.wallpaper.picker.DisplayAspectRatioLinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_marginHorizontal="24dp" + android:layout_marginBottom="28dp" + android:background="@drawable/picker_fragment_background" + android:paddingTop="22dp" + android:clipChildren="false"> + + <FrameLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + > + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/color_type_tabs" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:clipToPadding="false" + android:paddingHorizontal="16dp" + android:layout_gravity="center_horizontal"/> + + <!-- + This is just an invisible placeholder put in place so that the parent keeps its height + stable as the RecyclerView updates from 0 items to N items. Keeping it stable allows the + layout logic to keep the size of the preview container stable as well, which bodes well + for setting up the SurfaceView for remote rendering without changing its size after the + content is loaded into the RecyclerView. + + It's critical for any TextViews inside the included layout to have text. + --> + <include + layout="@layout/picker_fragment_tab" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="invisible" /> + + </FrameLayout> + + <View + android:layout_width="0dp" + android:layout_height="6dp" /> + + <TextView + android:id="@+id/color_type_tab_subhead" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textColor="@color/text_color_secondary" + android:textSize="12sp" + android:gravity="center" + android:paddingHorizontal="16dp"/> + + <View + android:layout_width="0dp" + android:layout_height="8dp" /> + + <FrameLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:clipChildren="false"> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/color_options" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:clipToPadding="false" + android:paddingHorizontal="16dp" + android:clipChildren="false" /> + + <!-- + This is just an invisible placeholder put in place so that the parent keeps its height + stable as the RecyclerView updates from 0 items to N items. Keeping it stable allows the + layout logic to keep the size of the preview container stable as well, which bodes well + for setting up the SurfaceView for remote rendering without changing its size after the + content is loaded into the RecyclerView. + + It's critical for any TextViews inside the included layout to have text. + --> + <include + layout="@layout/color_option_2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="invisible" /> + + </FrameLayout> + + <FrameLayout + android:id="@+id/dark_mode_toggle_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + + </LinearLayout> + +</LinearLayout> diff --git a/res/layout/fragment_grid.xml b/res/layout/fragment_grid.xml new file mode 100644 index 00000000..4f0aaefe --- /dev/null +++ b/res/layout/fragment_grid.xml @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ Copyright (C) 2023 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="match_parent" + android:orientation="vertical" + android:clipChildren="false"> + + <FrameLayout + android:id="@+id/section_header_container" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <include layout="@layout/section_header" /> + + </FrameLayout> + + <com.android.wallpaper.picker.DisplayAspectRatioFrameLayout + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:paddingTop="20dp" + android:paddingBottom="40dp"> + + <include + android:id="@+id/preview" + layout="@layout/wallpaper_preview_card" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_gravity="center"/> + + </com.android.wallpaper.picker.DisplayAspectRatioFrameLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_marginHorizontal="24dp" + android:layout_marginBottom="28dp" + android:background="@drawable/picker_fragment_background" + android:paddingBottom="62dp" + android:clipChildren="false"> + + <FrameLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="22dp" + android:clipChildren="false"> + + <androidx.recyclerview.widget.RecyclerView + android:id="@id/options" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:clipToPadding="false" + android:paddingHorizontal="16dp" + android:clipChildren="false" /> + + <!-- + This is just an invisible placeholder put in place so that the parent keeps its height + stable as the RecyclerView updates from 0 items to N items. Keeping it stable allows the + layout logic to keep the size of the preview container stable as well, which bodes well + for setting up the SurfaceView for remote rendering without changing its size after the + content is loaded into the RecyclerView. + + It's critical for any TextViews inside the included layout to have text. + --> + <include + layout="@layout/grid_option_2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="invisible" /> + + </FrameLayout> + + </LinearLayout> + +</LinearLayout> diff --git a/res/layout/fragment_lock_screen_quick_affordances.xml b/res/layout/fragment_lock_screen_quick_affordances.xml index 331d501a..36d1697b 100644 --- a/res/layout/fragment_lock_screen_quick_affordances.xml +++ b/res/layout/fragment_lock_screen_quick_affordances.xml @@ -18,7 +18,8 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical"> + android:orientation="vertical" + android:clipChildren="false"> <FrameLayout android:id="@+id/section_header_container" @@ -33,7 +34,7 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" - android:paddingTop="36dp" + android:paddingTop="20dp" android:paddingBottom="40dp"> <include @@ -51,9 +52,10 @@ android:orientation="vertical" android:layout_marginHorizontal="24dp" android:layout_marginBottom="28dp" - android:background="@drawable/keyguard_quick_affordance_picker_background" + android:background="@drawable/picker_fragment_background" android:paddingTop="22dp" - android:paddingBottom="62dp"> + android:paddingBottom="62dp" + android:clipChildren="false"> <FrameLayout android:layout_width="match_parent" @@ -62,8 +64,9 @@ <androidx.recyclerview.widget.RecyclerView android:id="@id/slot_tabs" - android:layout_width="match_parent" + android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" android:clipToPadding="false" android:paddingHorizontal="16dp" /> @@ -77,7 +80,7 @@ It's critical for any TextViews inside the included layout to have text. --> <include - layout="@layout/keyguard_quick_affordance_slot_tab" + layout="@layout/picker_fragment_tab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="invisible" /> @@ -90,14 +93,17 @@ <FrameLayout android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:clipChildren="false"> <androidx.recyclerview.widget.RecyclerView android:id="@id/affordances" - android:layout_width="match_parent" + android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" android:clipToPadding="false" - android:paddingHorizontal="16dp" /> + android:paddingHorizontal="16dp" + android:clipChildren="false" /> <!-- This is just an invisible placeholder put in place so that the parent keeps its height diff --git a/res/layout/grid_option_2.xml b/res/layout/grid_option_2.xml new file mode 100644 index 00000000..a8b453a9 --- /dev/null +++ b/res/layout/grid_option_2.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 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="@dimen/option_item_size" + android:layout_height="wrap_content" + android:orientation="vertical" + android:gravity="center_horizontal" + android:clipChildren="false"> + + <FrameLayout + android:layout_width="@dimen/option_item_size" + android:layout_height="@dimen/option_item_size" + android:clipChildren="false"> + + <ImageView + android:id="@id/selection_border" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@drawable/option_item_border" + android:alpha="0" + android:importantForAccessibility="no" /> + + <ImageView + android:id="@id/background" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@drawable/option_item_background" + android:importantForAccessibility="no" /> + + <ImageView + android:id="@id/foreground" + android:layout_width="58dp" + android:layout_height="58dp" + android:layout_gravity="center" /> + + </FrameLayout> + + <View + android:layout_width="0dp" + android:layout_height="8dp" /> + + <TextView + android:id="@id/text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/text_color_primary" + android:singleLine="true" + android:ellipsize="end" + android:text="Placeholder for stable size calculation, please do not remove." + tools:ignore="HardcodedText" /> + +</LinearLayout> diff --git a/res/layout/grid_preview_card.xml b/res/layout/grid_preview_card.xml index e333ca7b..a2691df8 100644 --- a/res/layout/grid_preview_card.xml +++ b/res/layout/grid_preview_card.xml @@ -38,4 +38,13 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:importantForAccessibility="noHideDescendants" /> + + <ImageView + android:id="@+id/grid_fadein_scrim" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?android:colorSecondary" + android:forceHasOverlappingRendering="false" + android:importantForAccessibility="no" + android:visibility="invisible" /> </androidx.cardview.widget.CardView> diff --git a/res/layout/keyguard_quick_affordance.xml b/res/layout/keyguard_quick_affordance.xml index b3b6893f..1e5c3397 100644 --- a/res/layout/keyguard_quick_affordance.xml +++ b/res/layout/keyguard_quick_affordance.xml @@ -19,18 +19,34 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" - android:layout_width="@dimen/keyguard_quick_affordance_picker_item_width" + android:layout_width="@dimen/option_item_size" android:layout_height="wrap_content" android:orientation="vertical" - android:gravity="center_horizontal"> + android:gravity="center_horizontal" + android:clipChildren="false"> <FrameLayout - android:id="@+id/icon_container" - android:layout_width="@dimen/keyguard_quick_affordance_icon_container_size" - android:layout_height="@dimen/keyguard_quick_affordance_icon_container_size" > + android:layout_width="@dimen/option_item_size" + android:layout_height="@dimen/option_item_size" + android:clipChildren="false"> <ImageView - android:id="@+id/icon" + android:id="@id/selection_border" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@drawable/option_item_border" + android:alpha="0" + android:importantForAccessibility="no" /> + + <ImageView + android:id="@id/background" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@drawable/option_item_background" + android:importantForAccessibility="no" /> + + <ImageView + android:id="@id/foreground" android:layout_width="@dimen/keyguard_quick_affordance_icon_size" android:layout_height="@dimen/keyguard_quick_affordance_icon_size" android:layout_gravity="center" @@ -43,7 +59,7 @@ android:layout_height="8dp" /> <TextView - android:id="@+id/name" + android:id="@id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/text_color_primary" @@ -52,4 +68,4 @@ android:text="Placeholder for stable size calculation, please do not remove." tools:ignore="HardcodedText" /> -</LinearLayout>
\ No newline at end of file +</LinearLayout> diff --git a/res/layout/keyguard_quick_affordance_enablement_dialog.xml b/res/layout/keyguard_quick_affordance_enablement_dialog.xml deleted file mode 100644 index d6ba1054..00000000 --- a/res/layout/keyguard_quick_affordance_enablement_dialog.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?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="wrap_content" - android:layout_height="wrap_content" - android:background="@drawable/keyguard_quick_affordance_picker_background" - android:orientation="vertical" - android:padding="24dp"> - - <ImageView - android:id="@+id/icon" - android:layout_width="32dp" - android:layout_height="32dp" - android:tint="@color/color_accent_primary" - android:layout_gravity="center_horizontal" - android:layout_marginBottom="16dp" /> - - <TextView - android:id="@+id/title" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - android:textAppearance="@style/TextAppearance.MaterialComponents.Headline4" - android:layout_gravity="center_horizontal" - android:layout_marginBottom="16dp" /> - - <TextView - android:id="@+id/message" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textAppearance="@style/TextAppearance.MaterialComponents.Body1" - android:layout_gravity="center_horizontal" - android:layout_marginBottom="38dp" /> - - <Button - android:id="@+id/button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - style="@style/ActionPrimaryButton" - android:background="@drawable/button_background" - android:layout_gravity="end" /> - -</LinearLayout> diff --git a/res/layout/more_settings_section_view.xml b/res/layout/more_settings_section_view.xml new file mode 100644 index 00000000..b60bb452 --- /dev/null +++ b/res/layout/more_settings_section_view.xml @@ -0,0 +1,39 @@ +<?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. +--> +<com.android.customization.picker.settings.ui.view.MoreSettingsSectionView + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?selectableItemBackground" + android:clickable="true" + android:paddingVertical="@dimen/section_top_padding" + android:paddingHorizontal="@dimen/section_horizontal_padding" + android:orientation="vertical"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/more_settings_section_title" + style="@style/SectionTitleTextStyle" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/more_settings_section_description" + style="@style/SectionSubtitleTextStyle"/> + +</com.android.customization.picker.settings.ui.view.MoreSettingsSectionView> diff --git a/res/layout/notification_section.xml b/res/layout/notification_section.xml new file mode 100644 index 00000000..713624e0 --- /dev/null +++ b/res/layout/notification_section.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 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. + ~ + --> +<com.android.customization.picker.notifications.ui.view.NotificationSectionView + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?selectableItemBackground" + android:clickable="true" + android:paddingVertical="@dimen/section_top_padding" + android:paddingHorizontal="@dimen/section_horizontal_padding" + android:orientation="horizontal" + android:gravity="center_vertical"> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/notifications_section_title" + style="@style/SectionTitleTextStyle" /> + + <TextView + android:id="@+id/subtitle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + style="@style/SectionSubtitleTextStyle"/> + </LinearLayout> + + <Switch + android:id="@+id/switcher" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:clickable="false" + style="@style/Switch.SettingsLib" + tools:ignore="UseSwitchCompatOrMaterialXml" /> + +</com.android.customization.picker.notifications.ui.view.NotificationSectionView> diff --git a/res/layout/keyguard_quick_affordance_slot_tab.xml b/res/layout/picker_fragment_tab.xml index c4934d86..2e6e8fa2 100644 --- a/res/layout/keyguard_quick_affordance_slot_tab.xml +++ b/res/layout/picker_fragment_tab.xml @@ -21,12 +21,14 @@ android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@color/keyguard_quick_affordance_slot_tab_text_color" + android:textColor="@color/picker_fragment_tab_text_color" android:paddingVertical="8dp" android:paddingHorizontal="16dp" android:minWidth="48dp" - android:minHeight="48dp" + android:minHeight="36dp" android:gravity="center" - android:background="@drawable/keyguard_quick_affordance_slot_tab_background" + android:background="@drawable/picker_fragment_tab_background" android:text="Placeholder for stable size calculation, please do not remove." + android:maxLines="1" + android:ellipsize="end" tools:ignore="HardcodedText" /> diff --git a/res/layout/single_clock_view.xml b/res/layout/single_clock_view.xml new file mode 100644 index 00000000..e7ac5182 --- /dev/null +++ b/res/layout/single_clock_view.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Copyright (C) 2023 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. +--> +<com.android.wallpaper.picker.DisplayAspectRatioFrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="@dimen/clock_carousel_item_height"> + <FrameLayout + android:id="@+id/single_clock_host_view" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center" /> +</com.android.wallpaper.picker.DisplayAspectRatioFrameLayout>
\ No newline at end of file |
