Caitlin Cassidy | b382874 | 2021-11-30 20:10:33 +0000 | [diff] [blame] | 1 | <!-- |
| 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 Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 16 | <!-- 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 Shkuratov | 22bf019 | 2022-10-10 21:19:08 +0000 | [diff] [blame] | 19 | <com.android.systemui.temporarydisplay.chipbar.ChipbarRootView |
Caitlin Cassidy | b382874 | 2021-11-30 20:10:33 +0000 | [diff] [blame] | 20 | xmlns:android="http://schemas.android.com/apk/res/android" |
Caitlin Cassidy | ecb939f | 2021-11-30 20:46:54 +0000 | [diff] [blame] | 21 | xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" |
Caitlin Shkuratov | 4fb68a9 | 2022-10-12 19:03:46 +0000 | [diff] [blame] | 22 | android:id="@+id/chipbar_root_view" |
Caitlin Cassidy | b382874 | 2021-11-30 20:10:33 +0000 | [diff] [blame] | 23 | android:layout_width="wrap_content" |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 24 | android:layout_height="wrap_content"> |
Caitlin Cassidy | b382874 | 2021-11-30 20:10:33 +0000 | [diff] [blame] | 25 | |
Caitlin Shkuratov | 34f257b | 2022-12-22 21:21:52 +0000 | [diff] [blame] | 26 | <!-- Extra marginBottom to give room for the drop shadow. --> |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 27 | <LinearLayout |
Caitlin Shkuratov | 4fb68a9 | 2022-10-12 19:03:46 +0000 | [diff] [blame] | 28 | android:id="@+id/chipbar_inner" |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 29 | android:orientation="horizontal" |
Caitlin Cassidy | b382874 | 2021-11-30 20:10:33 +0000 | [diff] [blame] | 30 | android:layout_width="wrap_content" |
| 31 | android:layout_height="wrap_content" |
Caitlin Shkuratov | 5eb4f21 | 2023-03-08 16:01:52 +0000 | [diff] [blame] | 32 | android:padding="@dimen/chipbar_outer_padding" |
| 33 | android:background="@drawable/chipbar_background" |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 34 | android:layout_marginTop="20dp" |
Caitlin Cassidy | bdb754d | 2022-06-15 21:09:30 +0000 | [diff] [blame] | 35 | android:layout_marginStart="@dimen/notification_side_paddings" |
| 36 | android:layout_marginEnd="@dimen/notification_side_paddings" |
Caitlin Shkuratov | 34f257b | 2022-12-22 21:21:52 +0000 | [diff] [blame] | 37 | android:translationZ="4dp" |
| 38 | android:layout_marginBottom="8dp" |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 39 | android:clipToPadding="false" |
| 40 | android:gravity="center_vertical" |
| 41 | android:alpha="0.0" |
| 42 | > |
Caitlin Cassidy | b382874 | 2021-11-30 20:10:33 +0000 | [diff] [blame] | 43 | |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 44 | <com.android.internal.widget.CachingIconView |
Caitlin Shkuratov | 4fb68a9 | 2022-10-12 19:03:46 +0000 | [diff] [blame] | 45 | android:id="@+id/start_icon" |
Caitlin Shkuratov | 5eb4f21 | 2023-03-08 16:01:52 +0000 | [diff] [blame] | 46 | android:layout_width="@dimen/chipbar_start_icon_size" |
| 47 | android:layout_height="@dimen/chipbar_start_icon_size" |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 48 | android:layout_marginEnd="12dp" |
| 49 | android:alpha="0.0" |
| 50 | /> |
Caitlin Cassidy | a0cf542 | 2022-01-13 19:06:41 +0000 | [diff] [blame] | 51 | |
Caitlin Shkuratov | 5fa182d | 2024-08-05 19:58:42 +0000 | [diff] [blame] | 52 | <!-- LINT.IfChange --> |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 53 | <TextView |
| 54 | android:id="@+id/text" |
Caitlin Cassidy | bdb754d | 2022-06-15 21:09:30 +0000 | [diff] [blame] | 55 | android:layout_width="0dp" |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 56 | android:layout_height="wrap_content" |
Caitlin Cassidy | bdb754d | 2022-06-15 21:09:30 +0000 | [diff] [blame] | 57 | android:layout_weight="1" |
Caitlin Shkuratov | 577441d | 2023-04-04 15:49:44 +0000 | [diff] [blame] | 58 | style="@style/Chipbar.Text" |
Caitlin Shkuratov | e142d9c | 2023-04-04 16:00:30 +0000 | [diff] [blame] | 59 | android:textColor="?androidprv:attr/materialColorOnSecondaryFixed" |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 60 | android:alpha="0.0" |
| 61 | /> |
Caitlin Shkuratov | e142d9c | 2023-04-04 16:00:30 +0000 | [diff] [blame] | 62 | <!-- LINT.ThenChange(systemui.temporarydisplay.chipbar.ChipbarInfo.kt) --> |
Caitlin Cassidy | ecb939f | 2021-11-30 20:46:54 +0000 | [diff] [blame] | 63 | |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 64 | <!-- At most one of [loading, failure_icon, undo] will be visible at a time. --> |
Caitlin Shkuratov | 2878429 | 2023-02-09 21:53:28 +0000 | [diff] [blame] | 65 | <ImageView |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 66 | android:id="@+id/loading" |
Caitlin Shkuratov | 5eb4f21 | 2023-03-08 16:01:52 +0000 | [diff] [blame] | 67 | 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 Shkuratov | 2878429 | 2023-02-09 21:53:28 +0000 | [diff] [blame] | 70 | android:src="@drawable/ic_progress_activity" |
Caitlin Shkuratov | e142d9c | 2023-04-04 16:00:30 +0000 | [diff] [blame] | 71 | android:tint="?androidprv:attr/materialColorOnSecondaryFixedVariant" |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 72 | android:alpha="0.0" |
| 73 | /> |
Caitlin Cassidy | a0cf542 | 2022-01-13 19:06:41 +0000 | [diff] [blame] | 74 | |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 75 | <ImageView |
Caitlin Shkuratov | 4fb68a9 | 2022-10-12 19:03:46 +0000 | [diff] [blame] | 76 | android:id="@+id/error" |
Caitlin Shkuratov | 5eb4f21 | 2023-03-08 16:01:52 +0000 | [diff] [blame] | 77 | 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 Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 80 | android:src="@drawable/ic_warning" |
Caitlin Shkuratov | 5fa182d | 2024-08-05 19:58:42 +0000 | [diff] [blame] | 81 | android:tint="@color/GM2_red_800" |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 82 | android:alpha="0.0" |
| 83 | /> |
Caitlin Cassidy | 5913ddb | 2021-11-30 19:44:13 +0000 | [diff] [blame] | 84 | |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 85 | <TextView |
Caitlin Shkuratov | 4fb68a9 | 2022-10-12 19:03:46 +0000 | [diff] [blame] | 86 | android:id="@+id/end_button" |
Caitlin Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 87 | android:layout_width="wrap_content" |
| 88 | android:layout_height="wrap_content" |
Caitlin Shkuratov | 5eb4f21 | 2023-03-08 16:01:52 +0000 | [diff] [blame] | 89 | android:layout_marginStart="@dimen/chipbar_end_item_start_margin" |
Caitlin Shkuratov | 577441d | 2023-04-04 15:49:44 +0000 | [diff] [blame] | 90 | style="@style/Chipbar.Text" |
Caitlin Shkuratov | e142d9c | 2023-04-04 16:00:30 +0000 | [diff] [blame] | 91 | android:textColor="?androidprv:attr/materialColorOnPrimaryFixed" |
Caitlin Shkuratov | 5eb4f21 | 2023-03-08 16:01:52 +0000 | [diff] [blame] | 92 | 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 Cassidy | 9f1fc82 | 2022-05-16 20:41:46 +0000 | [diff] [blame] | 99 | android:alpha="0.0" |
| 100 | /> |
| 101 | |
| 102 | </LinearLayout> |
Caitlin Shkuratov | 22bf019 | 2022-10-10 21:19:08 +0000 | [diff] [blame] | 103 | </com.android.systemui.temporarydisplay.chipbar.ChipbarRootView> |