1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2016 The Android Open Source Project 4 ~ 5 ~ Licensed under the Apache License, Version 2.0 (the "License"); 6 ~ you may not use this file except in compliance with the License. 7 ~ You may obtain a copy of the License at 8 ~ 9 ~ http://www.apache.org/licenses/LICENSE-2.0 10 ~ 11 ~ Unless required by applicable law or agreed to in writing, software 12 ~ distributed under the License is distributed on an "AS IS" BASIS, 13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 ~ See the License for the specific language governing permissions and 15 ~ limitations under the License 16 --> 17<com.android.incallui.answer.impl.AffordanceHolderLayout 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto" 20 xmlns:tools="http://schemas.android.com/tools" 21 android:id="@+id/incoming_container" 22 android:layout_width="match_parent" 23 android:layout_height="match_parent" 24 android:clipChildren="false" 25 android:clipToPadding="false" 26 android:keepScreenOn="true"> 27 28 <TextureView 29 android:id="@+id/incoming_preview_texture_view" 30 android:layout_width="match_parent" 31 android:layout_height="match_parent" 32 android:importantForAccessibility="no" 33 android:visibility="gone"/> 34 35 <com.android.incallui.answer.impl.FixedAspectSurfaceView 36 android:id="@+id/incoming_preview_surface_view" 37 android:layout_width="match_parent" 38 android:layout_height="match_parent" 39 android:importantForAccessibility="no" 40 android:visibility="gone" 41 app:scaleHeight="@bool/scale_height" 42 app:scaleWidth="@bool/scale_width"/> 43 44 <View 45 android:id="@+id/incoming_preview_texture_view_overlay" 46 android:layout_width="match_parent" 47 android:layout_height="match_parent" 48 android:background="@color/videocall_overlay_background_color" 49 android:visibility="gone"/> 50 51 <FrameLayout 52 android:layout_width="match_parent" 53 android:layout_height="match_parent" 54 android:fitsSystemWindows="true"> 55 56 <FrameLayout 57 android:id="@+id/answer_method_container" 58 android:layout_width="match_parent" 59 android:layout_height="match_parent" 60 android:clipChildren="false" 61 android:clipToPadding="false"/> 62 63 <TextView 64 android:id="@+id/videocall_video_off" 65 android:layout_width="wrap_content" 66 android:layout_height="wrap_content" 67 android:layout_gravity="center" 68 android:padding="64dp" 69 android:accessibilityTraversalBefore="@+id/videocall_speaker_button" 70 android:drawablePadding="8dp" 71 android:drawableTop="@drawable/quantum_ic_videocam_off_white_36" 72 android:gravity="center" 73 android:text="@string/call_incoming_video_is_off" 74 android:textAppearance="@style/Dialer.Incall.TextAppearance" 75 android:visibility="gone"/> 76 77 <LinearLayout 78 android:id="@+id/incall_contact_grid" 79 android:layout_width="match_parent" 80 android:layout_height="match_parent" 81 android:layout_marginTop="24dp" 82 android:clipChildren="false" 83 android:clipToPadding="false" 84 android:focusable="true" 85 android:gravity="top|center_horizontal" 86 android:orientation="vertical"> 87 88 <include 89 android:id="@id/contactgrid_top_row" 90 layout="@layout/incall_contactgrid_top_row" 91 android:layout_width="wrap_content" 92 android:layout_height="wrap_content" 93 android:layout_marginBottom="8dp" 94 android:layout_marginStart="24dp" 95 android:layout_marginEnd="24dp"/> 96 97 <!-- We have to keep deprecated singleLine to allow long text being truncated with ellipses. 98 a bug --> 99 <com.android.incallui.autoresizetext.AutoResizeTextView 100 android:id="@id/contactgrid_contact_name" 101 android:layout_width="wrap_content" 102 android:layout_height="wrap_content" 103 android:layout_marginBottom="8dp" 104 android:layout_marginStart="24dp" 105 android:layout_marginEnd="24dp" 106 android:singleLine="true" 107 android:textAppearance="@style/Dialer.Incall.TextAppearance.Large" 108 android:textSize="@dimen/answer_contact_name_text_size" 109 app:autoResizeText_minTextSize="@dimen/answer_contact_name_min_size" 110 tools:ignore="Deprecated" 111 tools:text="Jake Peralta"/> 112 113 <include 114 android:id="@id/contactgrid_bottom_row" 115 layout="@layout/incall_contactgrid_bottom_row" 116 android:layout_width="wrap_content" 117 android:layout_height="wrap_content" 118 android:layout_marginStart="24dp" 119 android:layout_marginEnd="24dp"/> 120 121 <!-- TODO(a bug): textColorPrimary or textColorPrimaryInverse? --> 122 <TextView 123 android:id="@+id/incall_important_call_badge" 124 android:textStyle="bold" 125 android:layout_width="wrap_content" 126 android:layout_height="48dp" 127 android:layout_marginTop="4dp" 128 android:layout_marginBottom="@dimen/answer_importance_margin_bottom" 129 android:background="@drawable/urgent_call_background" 130 android:elevation="@dimen/answer_data_elevation" 131 android:gravity="center" 132 android:maxLines="1" 133 android:text="@string/call_incoming_important" 134 android:textAllCaps="true" 135 android:textColor="?android:attr/colorBackground" 136 android:textSize="14sp"/> 137 138 <FrameLayout 139 android:id="@+id/incall_location_holder" 140 android:layout_width="match_parent" 141 android:layout_height="wrap_content"/> 142 143 <include 144 layout="@layout/device_number_row" 145 android:layout_width="match_parent" 146 android:layout_height="wrap_content"/> 147 148 <FrameLayout 149 android:id="@+id/incall_data_container" 150 android:layout_width="match_parent" 151 android:layout_height="0dp" 152 android:layout_weight="1" 153 android:clipChildren="false" 154 android:clipToPadding="false"> 155 <LinearLayout 156 android:id="@+id/incall_data_container_chip_container" 157 android:layout_width="wrap_content" 158 android:layout_height="wrap_content" 159 android:layout_gravity="center_horizontal|bottom" 160 android:orientation="horizontal" 161 android:visibility="gone"> 162 </LinearLayout> 163 </FrameLayout> 164 165 <!-- Space holder for answer method. This is used to get better scaling to make room for 166 incall_data_container on different screen size. --> 167 <Space 168 android:layout_width="match_parent" 169 android:layout_height="220dp"/> 170 171 </LinearLayout> 172 </FrameLayout> 173 174 <com.android.incallui.answer.impl.affordance.SwipeButtonView 175 android:id="@+id/incoming_secondary_button" 176 android:layout_width="56dp" 177 android:layout_height="56dp" 178 android:layout_gravity="bottom|start" 179 android:scaleType="center" 180 android:src="@drawable/quantum_ic_message_white_24" 181 android:visibility="invisible" 182 tools:visibility="visible"/> 183 184 <com.android.incallui.answer.impl.affordance.SwipeButtonView 185 android:id="@+id/incoming_secondary_button2" 186 android:layout_width="56dp" 187 android:layout_height="56dp" 188 android:layout_gravity="bottom|end" 189 android:scaleType="center" 190 android:src="@drawable/ic_end_answer_32" 191 android:visibility="invisible" 192 tools:visibility="visible"/> 193</com.android.incallui.answer.impl.AffordanceHolderLayout> 194