blob: e1b8ab4697654feac037837bce1bc9f9821f2df4 [file] [log] [blame]
Caitlin Cassidyb3828742021-11-30 20:10:33 +00001<!--
2 ~ Copyright (C) 2021 The Android Open Source Project
3 ~
4 ~ Licensed under the Apache License, Version 2.0 (the "License");
5 ~ you may not use this file except in compliance with the License.
6 ~ You may obtain a copy of the License at
7 ~
8 ~ http://www.apache.org/licenses/LICENSE-2.0
9 ~
10 ~ Unless required by applicable law or agreed to in writing, software
11 ~ distributed under the License is distributed on an "AS IS" BASIS,
12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ~ See the License for the specific language governing permissions and
14 ~ limitations under the License.
15 -->
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000016<!-- Wrap in a frame layout so that we can update the margins on the inner layout. (Since this view
17 is the root view of a window, we cannot change the root view's margins.) -->
18<!-- Alphas start as 0 because the view will be animated in. -->
Caitlin Shkuratov22bf0192022-10-10 21:19:08 +000019<com.android.systemui.temporarydisplay.chipbar.ChipbarRootView
Caitlin Cassidyb3828742021-11-30 20:10:33 +000020 xmlns:android="http://schemas.android.com/apk/res/android"
Caitlin Cassidyecb939f2021-11-30 20:46:54 +000021 xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
Caitlin Shkuratov4fb68a92022-10-12 19:03:46 +000022 android:id="@+id/chipbar_root_view"
Caitlin Cassidyb3828742021-11-30 20:10:33 +000023 android:layout_width="wrap_content"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000024 android:layout_height="wrap_content">
Caitlin Cassidyb3828742021-11-30 20:10:33 +000025
Caitlin Shkuratov34f257b2022-12-22 21:21:52 +000026 <!-- Extra marginBottom to give room for the drop shadow. -->
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000027 <LinearLayout
Caitlin Shkuratov4fb68a92022-10-12 19:03:46 +000028 android:id="@+id/chipbar_inner"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000029 android:orientation="horizontal"
Caitlin Cassidyb3828742021-11-30 20:10:33 +000030 android:layout_width="wrap_content"
31 android:layout_height="wrap_content"
Caitlin Shkuratov5eb4f212023-03-08 16:01:52 +000032 android:padding="@dimen/chipbar_outer_padding"
33 android:background="@drawable/chipbar_background"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000034 android:layout_marginTop="20dp"
Caitlin Cassidybdb754d2022-06-15 21:09:30 +000035 android:layout_marginStart="@dimen/notification_side_paddings"
36 android:layout_marginEnd="@dimen/notification_side_paddings"
Caitlin Shkuratov34f257b2022-12-22 21:21:52 +000037 android:translationZ="4dp"
38 android:layout_marginBottom="8dp"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000039 android:clipToPadding="false"
40 android:gravity="center_vertical"
41 android:alpha="0.0"
42 >
Caitlin Cassidyb3828742021-11-30 20:10:33 +000043
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000044 <com.android.internal.widget.CachingIconView
Caitlin Shkuratov4fb68a92022-10-12 19:03:46 +000045 android:id="@+id/start_icon"
Caitlin Shkuratov5eb4f212023-03-08 16:01:52 +000046 android:layout_width="@dimen/chipbar_start_icon_size"
47 android:layout_height="@dimen/chipbar_start_icon_size"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000048 android:layout_marginEnd="12dp"
49 android:alpha="0.0"
50 />
Caitlin Cassidya0cf5422022-01-13 19:06:41 +000051
Caitlin Shkuratov5fa182d2024-08-05 19:58:42 +000052 <!-- LINT.IfChange -->
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000053 <TextView
54 android:id="@+id/text"
Caitlin Cassidybdb754d2022-06-15 21:09:30 +000055 android:layout_width="0dp"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000056 android:layout_height="wrap_content"
Caitlin Cassidybdb754d2022-06-15 21:09:30 +000057 android:layout_weight="1"
Caitlin Shkuratov577441d2023-04-04 15:49:44 +000058 style="@style/Chipbar.Text"
Caitlin Shkuratove142d9c2023-04-04 16:00:30 +000059 android:textColor="?androidprv:attr/materialColorOnSecondaryFixed"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000060 android:alpha="0.0"
61 />
Caitlin Shkuratove142d9c2023-04-04 16:00:30 +000062 <!-- LINT.ThenChange(systemui.temporarydisplay.chipbar.ChipbarInfo.kt) -->
Caitlin Cassidyecb939f2021-11-30 20:46:54 +000063
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000064 <!-- At most one of [loading, failure_icon, undo] will be visible at a time. -->
Caitlin Shkuratov28784292023-02-09 21:53:28 +000065 <ImageView
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000066 android:id="@+id/loading"
Caitlin Shkuratov5eb4f212023-03-08 16:01:52 +000067 android:layout_width="@dimen/chipbar_end_icon_size"
68 android:layout_height="@dimen/chipbar_end_icon_size"
69 android:layout_marginStart="@dimen/chipbar_end_item_start_margin"
Caitlin Shkuratov28784292023-02-09 21:53:28 +000070 android:src="@drawable/ic_progress_activity"
Caitlin Shkuratove142d9c2023-04-04 16:00:30 +000071 android:tint="?androidprv:attr/materialColorOnSecondaryFixedVariant"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000072 android:alpha="0.0"
73 />
Caitlin Cassidya0cf5422022-01-13 19:06:41 +000074
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000075 <ImageView
Caitlin Shkuratov4fb68a92022-10-12 19:03:46 +000076 android:id="@+id/error"
Caitlin Shkuratov5eb4f212023-03-08 16:01:52 +000077 android:layout_width="@dimen/chipbar_end_icon_size"
78 android:layout_height="@dimen/chipbar_end_icon_size"
79 android:layout_marginStart="@dimen/chipbar_end_item_start_margin"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000080 android:src="@drawable/ic_warning"
Caitlin Shkuratov5fa182d2024-08-05 19:58:42 +000081 android:tint="@color/GM2_red_800"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000082 android:alpha="0.0"
83 />
Caitlin Cassidy5913ddb2021-11-30 19:44:13 +000084
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000085 <TextView
Caitlin Shkuratov4fb68a92022-10-12 19:03:46 +000086 android:id="@+id/end_button"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000087 android:layout_width="wrap_content"
88 android:layout_height="wrap_content"
Caitlin Shkuratov5eb4f212023-03-08 16:01:52 +000089 android:layout_marginStart="@dimen/chipbar_end_item_start_margin"
Caitlin Shkuratov577441d2023-04-04 15:49:44 +000090 style="@style/Chipbar.Text"
Caitlin Shkuratove142d9c2023-04-04 16:00:30 +000091 android:textColor="?androidprv:attr/materialColorOnPrimaryFixed"
Caitlin Shkuratov5eb4f212023-03-08 16:01:52 +000092 android:paddingStart="@dimen/chipbar_outer_padding"
93 android:paddingEnd="@dimen/chipbar_outer_padding"
94 android:paddingTop="@dimen/chipbar_end_button_vertical_padding"
95 android:paddingBottom="@dimen/chipbar_end_button_vertical_padding"
96 android:layout_marginTop="@dimen/chipbar_end_button_vertical_negative_margin"
97 android:layout_marginBottom="@dimen/chipbar_end_button_vertical_negative_margin"
98 android:background="@drawable/chipbar_end_button_background"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000099 android:alpha="0.0"
100 />
101
102 </LinearLayout>
Caitlin Shkuratov22bf0192022-10-10 21:19:08 +0000103</com.android.systemui.temporarydisplay.chipbar.ChipbarRootView>