1 <?xml version="1.0" encoding="utf-8"?> 2 3 <!-- 4 ~ Copyright (C) 2013 The Android Open Source Project 5 ~ 6 ~ Licensed under the Apache License, Version 2.0 (the "License"); 7 ~ you may not use this file except in compliance with the License. 8 ~ You may obtain a copy of the License at 9 ~ 10 ~ http://www.apache.org/licenses/LICENSE-2.0 11 ~ 12 ~ Unless required by applicable law or agreed to in writing, software 13 ~ distributed under the License is distributed on an "AS IS" BASIS, 14 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 ~ See the License for the specific language governing permissions and 16 ~ limitations under the License 17 --> 18 19 <!-- "Call Banner" for primary call, the foregound or ringing call. The "call banner" is a block 20 of info about a single call, including the contact name, phone number, call time counter, and 21 other status info. This info is shown as a "banner" overlaid across the top of contact photo. 22 --> 23 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 24 android:id="@+id/primary_call_banner" 25 android:layout_width="match_parent" 26 android:layout_height="wrap_content" 27 android:orientation="vertical" 28 android:minHeight="@dimen/call_banner_height" 29 android:paddingStart="@dimen/call_banner_side_padding" 30 android:paddingEnd="@dimen/call_banner_side_padding" 31 android:clipChildren="false" 32 android:clipToPadding="false" 33 android:animateLayoutChanges="true" 34 android:gravity="center"> 35 36 <LinearLayout android:id="@+id/callStateButton" 37 android:layout_width="match_parent" 38 android:layout_height="wrap_content" 39 android:orientation="horizontal" 40 android:clipChildren="false" 41 android:clipToPadding="false"> 42 43 <!-- Subscription provider or WiFi calling icon displayed to the left of the label --> 44 <ImageView android:id="@+id/callStateIcon" 45 android:layout_width="16dp" 46 android:layout_height="16dp" 47 android:layout_marginEnd="4dp" 48 android:baselineAlignBottom="true" 49 android:tint="@color/incall_accent_color" 50 android:alpha="0.0" 51 android:scaleType="centerInside" 52 android:visibility="gone" /> 53 54 <ImageView android:id="@+id/videoCallIcon" 55 android:src="@drawable/ic_toolbar_video" 56 android:layout_width="16dp" 57 android:layout_height="16dp" 58 android:layout_marginEnd="4dp" 59 android:baselineAlignBottom="true" 60 android:tint="@color/incall_accent_color" 61 android:scaleType="centerInside" 62 android:visibility="gone" /> 63 64 <TextView android:id="@+id/callStateLabel" 65 android:layout_width="match_parent" 66 android:layout_height="wrap_content" 67 android:textAlignment="viewStart" 68 android:textAppearance="?android:attr/textAppearanceLarge" 69 android:textColor="@color/incall_accent_color" 70 android:textSize="@dimen/call_status_text_size" 71 android:alpha="0.7" 72 android:singleLine="true" 73 android:gravity="start" 74 android:ellipsize="end" /> 75 76 </LinearLayout> 77 78 <!-- Name (or the phone number, if we don't have a name to display). --> 79 <com.android.phone.common.widget.ResizingTextTextView android:id="@+id/name" 80 xmlns:ex="http://schemas.android.com/apk/res-auto" 81 android:layout_width="match_parent" 82 android:layout_height="wrap_content" 83 android:layout_marginTop="-5dp" 84 android:fontFamily="sans-serif-light" 85 android:textAlignment="viewStart" 86 android:textAppearance="?android:attr/textAppearanceLarge" 87 android:textSize="@dimen/call_name_text_size" 88 android:singleLine="true" 89 ex:resizing_text_min_size="@dimen/call_name_text_min_size" /> 90 91 92 <LinearLayout 93 android:layout_width="match_parent" 94 android:layout_height="wrap_content" 95 android:orientation="horizontal" 96 android:clipChildren="false" 97 android:clipToPadding="false"> 98 99 <!-- Label (like "Mobile" or "Work", if present) and phone number, side by side --> 100 <LinearLayout android:id="@+id/labelAndNumber" 101 android:layout_width="wrap_content" 102 android:layout_height="wrap_content" 103 android:orientation="horizontal"> 104 105 <TextView android:id="@+id/label" 106 android:layout_width="wrap_content" 107 android:layout_height="wrap_content" 108 android:textAppearance="?android:attr/textAppearanceSmall" 109 android:textColor="@color/incall_call_banner_subtext_color" 110 android:textSize="@dimen/call_label_text_size" 111 android:singleLine="true" 112 android:textDirection="ltr" /> 113 114 <TextView android:id="@+id/phoneNumber" 115 android:layout_width="match_parent" 116 android:layout_height="wrap_content" 117 android:layout_marginStart="6dp" 118 android:textAppearance="?android:attr/textAppearanceSmall" 119 android:textColor="@color/incall_call_banner_subtext_color" 120 android:textSize="@dimen/call_label_text_size" 121 android:singleLine="true" /> 122 123 </LinearLayout> 124 125 <!-- Elapsed time indication for a call in progress. --> 126 <TextView android:id="@+id/elapsedTime" 127 android:layout_width="0dp" 128 android:layout_height="wrap_content" 129 android:layout_weight="1" 130 android:layout_centerVertical="true" 131 android:textAlignment="viewEnd" 132 android:textAppearance="?android:attr/textAppearanceSmall" 133 android:textColor="@color/incall_call_banner_subtext_color" 134 android:textSize="@dimen/call_label_text_size" 135 android:singleLine="true" 136 android:visibility="gone" /> 137 138 </LinearLayout> 139 140 <!-- Call type indication: a special label and/or branding 141 for certain kinds of calls (like "SIP call" for a SIP call.) --> 142 <TextView android:id="@+id/callTypeLabel" 143 android:layout_width="wrap_content" 144 android:layout_height="wrap_content" 145 android:textAppearance="?android:attr/textAppearanceSmall" 146 android:textColor="@color/incall_call_banner_text_color" 147 android:maxLines="1" 148 android:ellipsize="end" /> 149 150 </LinearLayout> <!-- End of call_banner --> 151