Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01931743 authored by Catherine Liang's avatar Catherine Liang Committed by Android (Google) Code Review
Browse files

Merge changes from topic "wpp-revamped-ui-clean-up-color" into main

* changes:
  Pre-revamped UI cleanup color file rename (1/2)
  Pre-revamped UI color manager & provider cleanup
parents 8bdbdfc7 2715b331
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
    android:orientation="vertical"
    android:clipChildren="false">

    <include layout="@layout/color_option_2"/>
    <include layout="@layout/color_option"/>

    <TextView
        android:id="@+id/text"
+35 −87
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
     Copyright (C) 2022 The Android Open Source Project
     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.
@@ -13,91 +13,39 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<!-- Enclosing layout must be match_parent so that we can center content within -->
<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="match_parent"
<!-- Content description is set programmatically on the parent FrameLayout -->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/option_item_size"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:clipChildren="false"
    android:gravity="center"
    android:padding="@dimen/option_tile_grid_tile_padding_min">

    <!--
        This displays the background. It is dynamically sized, constrained remain square and
        have a maximum size, and be centered within its parent.
     -->
    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_gravity="center"
        android:background="@drawable/option_border_color"
        android:gravity="center"
        android:padding="@dimen/option_tile_grid_icon_padding_min"
        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_max="@dimen/option_tile_width">

        <!-- This is the color wheel itself, constrained to a maximum size and centered -->
        <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_constraintEnd_toEndOf="parent"
            app:layout_constraintHeight_max="@dimen/component_color_chip_small_diameter_default"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintWidth_max="@dimen/component_color_chip_small_diameter_default">
    android:orientation="vertical"
    android:clipChildren="false">
    <FrameLayout
        android:id="@+id/icon_container"
        android:layout_width="@dimen/option_item_size"
        android:layout_height="@dimen/option_item_size"
        android:clipChildren="false">

        <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" />
            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/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" />
            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_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" />
        <com.android.customization.picker.color.ui.view.ColorOptionIconView
            android:id="@+id/foreground"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="@dimen/color_seed_chip_margin2"/>
    </FrameLayout>
</LinearLayout>
            <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>
    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

res/layout/color_option_2.xml

deleted100644 → 0
+0 −51
Original line number Diff line number Diff line
<?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="@dimen/option_item_size"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:clipChildren="false">
    <FrameLayout
        android:id="@+id/icon_container"
        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" />

        <com.android.customization.picker.color.ui.view.ColorOptionIconView
            android:id="@+id/foreground"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="@dimen/color_seed_chip_margin2"/>
    </FrameLayout>
</LinearLayout>

res/layout/color_options_view.xml

deleted100644 → 0
+0 −27
Original line number Diff line number Diff line
<?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.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/color_option_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:orientation="horizontal" />
</FrameLayout>

res/layout/color_pages_view.xml

deleted100644 → 0
+0 −33
Original line number Diff line number Diff line
<?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="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <androidx.viewpager2.widget.ViewPager2
        android:id="@+id/color_page_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>
    <com.android.wallpaper.widget.PageIndicator
        android:id="@+id/color_page_indicator"
        android:layout_marginTop="@dimen/color_page_indicator_margin_top"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        android:layout_gravity="center"/>
</LinearLayout>
Loading