<?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
    -->
    <com.android.customization.picker.color.ui.view.ColorOptionIconView
        android:id="@+id/option_tile"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_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/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"
        android:importantForAccessibility="no" />
</androidx.constraintlayout.widget.ConstraintLayout>
