blob: 687bcef29c0d8353862ddf2c7a76f20abe4054a3 [file] [log] [blame]
Catherine Liang82703622022-12-21 18:04:54 +00001<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright (C) 2023 The Android Open Source Project
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
Catherine Liang68e0a822023-01-26 20:22:58 +000017<com.android.customization.picker.color.ui.view.ColorSectionView2 xmlns:android="http://schemas.android.com/apk/res/android"
18 xmlns:tools="http://schemas.android.com/tools"
Catherine Liang82703622022-12-21 18:04:54 +000019 android:layout_width="match_parent"
20 android:layout_height="wrap_content"
Alejandro Nijamkina81df0d2023-01-30 14:36:49 -080021 android:layout_marginBottom="@dimen/section_bottom_padding"
22 android:layout_marginHorizontal="@dimen/section_horizontal_padding"
Catherine Liang68e0a822023-01-26 20:22:58 +000023 android:orientation="vertical"
24 android:background="@drawable/top_connected_section_background">
Catherine Liang82703622022-12-21 18:04:54 +000025
Alejandro Nijamkina81df0d2023-01-30 14:36:49 -080026 <!--
27 This is just an invisible placeholder put in place so that the parent keeps its height
28 stable as the RecyclerView updates from 0 items to N items. Keeping it stable allows the
29 layout logic to keep the size of the preview container stable as well, which bodes well
30 for setting up the SurfaceView for remote rendering without changing its size after the
31 content is loaded into the RecyclerView.
32
33 It's critical for any TextViews inside the included layout to have text.
34 -->
Catherine Liang68e0a822023-01-26 20:22:58 +000035 <LinearLayout
36 android:id="@+id/color_section_option_container"
37 android:layout_width="match_parent"
Catherine Liang82703622022-12-21 18:04:54 +000038 android:layout_height="wrap_content"
Catherine Liang68e0a822023-01-26 20:22:58 +000039 android:orientation="horizontal"
40 android:paddingVertical="24dp"
41 android:paddingHorizontal="24dp"
42 android:weightSum="@integer/color_section_num_columns">
43 <include
44 android:layout_width="0dp"
45 android:layout_height="wrap_content"
46 layout="@layout/color_option_overflow_no_background"
47 android:visibility="invisible"
48 android:layout_weight="1"/>
49 </LinearLayout>
50
51 <TextView
52 android:id="@+id/more_colors"
53 android:layout_width="wrap_content"
54 android:layout_height="wrap_content"
55 android:layout_gravity="center_horizontal"
56 android:layout_marginTop="10dp"
57 android:minHeight="48dp"
58 android:gravity="center"
59 android:drawablePadding="12dp"
60 android:drawableStart="@drawable/ic_nav_color"
61 android:drawableTint="@color/text_color_primary"
62 android:text="@string/more_colors"
63 android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"
64 android:textColor="@color/text_color_primary"
65 android:visibility="gone"
66 tools:ignore="UseCompatTextViewDrawableXml" />
Catherine Liang6f794ed2023-01-05 16:12:24 +000067</com.android.customization.picker.color.ui.view.ColorSectionView2>