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 --> 16<!-- Have the wrapper frame layout match the parent height so that we get a larger touch area for 17 the chip. --> 18<FrameLayout 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 android:id="@+id/ongoing_activity_chip" 21 android:layout_width="wrap_content" 22 android:layout_height="match_parent" 23 android:layout_gravity="center_vertical|start" 24 android:layout_marginStart="5dp" 25> 26 <!-- TODO(b/332662551): Update this content description when this supports more than just 27 phone calls. --> 28 <com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer 29 android:id="@+id/ongoing_activity_chip_background" 30 android:layout_width="wrap_content" 31 android:layout_height="@dimen/ongoing_appops_chip_height" 32 android:layout_gravity="center_vertical" 33 android:gravity="center" 34 android:background="@drawable/ongoing_activity_chip_bg" 35 android:paddingStart="@dimen/ongoing_activity_chip_side_padding" 36 android:paddingEnd="@dimen/ongoing_activity_chip_side_padding" 37 android:contentDescription="@string/ongoing_phone_call_content_description" 38 android:minWidth="@dimen/min_clickable_item_size" 39 > 40 41 <ImageView 42 android:src="@*android:drawable/ic_phone" 43 android:id="@+id/ongoing_activity_chip_icon" 44 android:layout_width="@dimen/ongoing_activity_chip_icon_size" 45 android:layout_height="@dimen/ongoing_activity_chip_icon_size" 46 android:tint="?android:attr/colorPrimary" 47 /> 48 49 <com.android.systemui.statusbar.chips.ui.view.ChipChronometer 50 android:id="@+id/ongoing_activity_chip_time" 51 android:layout_width="wrap_content" 52 android:layout_height="wrap_content" 53 android:singleLine="true" 54 android:gravity="center|start" 55 android:paddingStart="@dimen/ongoing_activity_chip_icon_text_padding" 56 android:textAppearance="@android:style/TextAppearance.Material.Small" 57 android:fontFamily="@*android:string/config_headlineFontFamily" 58 android:textColor="?android:attr/colorPrimary" 59 /> 60 61 </com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer> 62</FrameLayout> 63