blob: bc97e511e7f41dd33388a6a4d9a2219790d91f48 [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 Cassidy9f1fc822022-05-16 20:41:46 +000026 <LinearLayout
Caitlin Shkuratov4fb68a92022-10-12 19:03:46 +000027 android:id="@+id/chipbar_inner"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000028 android:orientation="horizontal"
Caitlin Cassidyb3828742021-11-30 20:10:33 +000029 android:layout_width="wrap_content"
30 android:layout_height="wrap_content"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000031 android:padding="@dimen/media_ttt_chip_outer_padding"
32 android:background="@drawable/media_ttt_chip_background"
33 android:layout_marginTop="20dp"
Caitlin Cassidybdb754d2022-06-15 21:09:30 +000034 android:layout_marginStart="@dimen/notification_side_paddings"
35 android:layout_marginEnd="@dimen/notification_side_paddings"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000036 android:clipToPadding="false"
37 android:gravity="center_vertical"
38 android:alpha="0.0"
39 >
Caitlin Cassidyb3828742021-11-30 20:10:33 +000040
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000041 <com.android.internal.widget.CachingIconView
Caitlin Shkuratov4fb68a92022-10-12 19:03:46 +000042 android:id="@+id/start_icon"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000043 android:layout_width="@dimen/media_ttt_app_icon_size"
44 android:layout_height="@dimen/media_ttt_app_icon_size"
45 android:layout_marginEnd="12dp"
46 android:alpha="0.0"
47 />
Caitlin Cassidya0cf5422022-01-13 19:06:41 +000048
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000049 <TextView
50 android:id="@+id/text"
Caitlin Cassidybdb754d2022-06-15 21:09:30 +000051 android:layout_width="0dp"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000052 android:layout_height="wrap_content"
Caitlin Cassidybdb754d2022-06-15 21:09:30 +000053 android:layout_weight="1"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000054 android:textSize="@dimen/media_ttt_text_size"
55 android:textColor="?android:attr/textColorPrimary"
56 android:alpha="0.0"
57 />
Caitlin Cassidyecb939f2021-11-30 20:46:54 +000058
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000059 <!-- At most one of [loading, failure_icon, undo] will be visible at a time. -->
60 <ProgressBar
61 android:id="@+id/loading"
62 android:indeterminate="true"
63 android:layout_width="@dimen/media_ttt_status_icon_size"
64 android:layout_height="@dimen/media_ttt_status_icon_size"
65 android:layout_marginStart="@dimen/media_ttt_last_item_start_margin"
66 android:indeterminateTint="?androidprv:attr/colorAccentPrimaryVariant"
67 style="?android:attr/progressBarStyleSmall"
68 android:alpha="0.0"
69 />
Caitlin Cassidya0cf5422022-01-13 19:06:41 +000070
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000071 <ImageView
Caitlin Shkuratov4fb68a92022-10-12 19:03:46 +000072 android:id="@+id/error"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000073 android:layout_width="@dimen/media_ttt_status_icon_size"
74 android:layout_height="@dimen/media_ttt_status_icon_size"
75 android:layout_marginStart="@dimen/media_ttt_last_item_start_margin"
76 android:src="@drawable/ic_warning"
77 android:tint="@color/GM2_red_500"
78 android:alpha="0.0"
79 />
Caitlin Cassidy5913ddb2021-11-30 19:44:13 +000080
Caitlin Shkuratov4fb68a92022-10-12 19:03:46 +000081 <!-- TODO(b/245610654): Re-name all the media-specific dimens to chipbar dimens instead. -->
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000082 <TextView
Caitlin Shkuratov4fb68a92022-10-12 19:03:46 +000083 android:id="@+id/end_button"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000084 android:layout_width="wrap_content"
85 android:layout_height="wrap_content"
Caitlin Cassidy9f1fc822022-05-16 20:41:46 +000086 android:textColor="?androidprv:attr/textColorOnAccent"
87 android:layout_marginStart="@dimen/media_ttt_last_item_start_margin"
88 android:textSize="@dimen/media_ttt_text_size"
89 android:paddingStart="@dimen/media_ttt_chip_outer_padding"
90 android:paddingEnd="@dimen/media_ttt_chip_outer_padding"
91 android:paddingTop="@dimen/media_ttt_undo_button_vertical_padding"
92 android:paddingBottom="@dimen/media_ttt_undo_button_vertical_padding"
93 android:layout_marginTop="@dimen/media_ttt_undo_button_vertical_negative_margin"
94 android:layout_marginBottom="@dimen/media_ttt_undo_button_vertical_negative_margin"
95 android:background="@drawable/media_ttt_undo_background"
96 android:alpha="0.0"
97 />
98
99 </LinearLayout>
Caitlin Shkuratov22bf0192022-10-10 21:19:08 +0000100</com.android.systemui.temporarydisplay.chipbar.ChipbarRootView>