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

Commit 6f794ed1 authored by Catherine Liang's avatar Catherine Liang
Browse files

Color Picker Fragment Selection Panel (1/2)

Implemented the bottom color selection panel within the new color fragment using clean architecture

Bug: 262924623
Test: Manual Verified, screen recording - https://drive.google.com/file/d/1vozlF_PoasDEectXdVvyk-6rGH5pvXDV/view?usp=sharing&resourcekey=0-EUDWLiHyC9W7m2jmUAF4RA
Change-Id: Ib899a10baa24a882814396f77886747214591a71
parent d3c279d3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -97,6 +97,6 @@
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:adjustViewBounds="true"
        android:src="@drawable/color_option_section_selected"
        android:src="@drawable/color_option_selected_no_background"
        android:visibility="gone"/>
</androidx.constraintlayout.widget.ConstraintLayout>
+78 −0
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 -->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/icon_container"
    android:layout_width="@dimen/option_tile_width"
    android:layout_height="@dimen/option_tile_width"
    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="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>
+3 −3
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<com.android.customization.picker.color.ColorSectionView2
<com.android.customization.picker.color.ui.view.ColorSectionView2
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/color_section_option_container"
    android:layout_width="match_parent"
@@ -39,7 +39,7 @@
    <include
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        layout="@layout/color_option_section_overflow"
        layout="@layout/color_option_overflow_no_background"
        android:visibility="invisible"
        android:layout_weight="1"/>
</com.android.customization.picker.color.ColorSectionView2>
</com.android.customization.picker.color.ui.view.ColorSectionView2>
Loading