1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2015 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 <FrameLayout 17 xmlns:android="http://schemas.android.com/apk/res/android" 18 xmlns:app="http://schemas.android.com/apk/res-auto" 19 android:layout_width="match_parent" 20 android:layout_height="match_parent" > 21 22 <ImageView 23 android:id="@+id/large_contact_photo" 24 android:layout_width="@dimen/in_call_large_contact_photo_size" 25 android:layout_height="match_parent" 26 android:layout_gravity="end" 27 android:alpha=".20" 28 android:scaleType="centerCrop" /> 29 30 <View 31 android:layout_width="@dimen/in_call_large_contact_photo_size" 32 android:layout_height="wrap_content" 33 android:layout_gravity="end" 34 android:background="@drawable/contact_photo_gradient" /> 35 36 <FrameLayout 37 android:background="@color/telecom_display_scrim" 38 android:layout_width="match_parent" 39 android:layout_height="match_parent" /> 40 41 <RelativeLayout 42 android:id="@+id/secondary_call_container" 43 android:layout_width="@dimen/in_call_large_contact_photo_size" 44 android:layout_height="match_parent" 45 android:layout_gravity="right" 46 android:paddingTop="128dp" 47 android:paddingStart="48dp" 48 android:background="@color/secondary_call_scrim" 49 android:visibility="gone" > 50 <TextView 51 android:id="@+id/name_secondary" 52 android:layout_width="match_parent" 53 android:layout_height="wrap_content" 54 android:maxWidth="@dimen/in_call_text_max_width" 55 style="@style/CarHeadline2.Light" /> 56 <TextView 57 android:id="@+id/info_secondary" 58 android:layout_width="match_parent" 59 android:layout_height="wrap_content" 60 android:layout_marginTop="4dp" 61 android:layout_below="@id/name_secondary" 62 android:maxWidth="@dimen/in_call_text_max_width" 63 android:alpha="0.6" 64 style="@style/CarBody2" 65 android:textColor="@color/car_grey_100" /> 66 </RelativeLayout> 67 68 <!-- In call dialpad --> 69 <android.support.v7.widget.CardView 70 android:id="@+id/dialpad_container" 71 android:layout_width="@dimen/in_call_card_dialpad_width" 72 android:layout_height="match_parent" 73 android:layout_gravity="top|start" 74 android:layout_marginTop="@dimen/lens_header_height" 75 app:cardBackgroundColor="@color/car_card" 76 app:cardCornerRadius="@dimen/in_call_card_dialpad_corner_radius" 77 app:cardElevation="@dimen/in_call_card_elevation" 78 android:visibility="gone" > 79 <include layout="@layout/dialpad" /> 80 </android.support.v7.widget.CardView> 81 82 <!-- In call card --> 83 <FrameLayout 84 android:id="@+id/card" 85 android:layout_width="match_parent" 86 android:layout_height="match_parent" 87 android:background="@drawable/in_call_card_background" 88 android:layout_marginTop="@dimen/lens_header_height" 89 android:layout_marginEnd="@dimen/in_call_card_margin_right" 90 android:paddingStart="@dimen/in_call_content_card_margin_start" > 91 <LinearLayout 92 android:layout_width="match_parent" 93 android:layout_height="match_parent" 94 android:orientation="horizontal"> 95 <RelativeLayout 96 android:layout_width="0dp" 97 android:layout_height="wrap_content" 98 android:layout_weight="1" 99 android:layout_marginTop="@dimen/in_call_info_margin_top" > 100 <TextView 101 android:id="@+id/name" 102 android:layout_width="match_parent" 103 android:layout_height="wrap_content" 104 android:ellipsize="end" 105 android:maxLines="2" 106 android:visibility="gone" 107 style="@style/CarHeadline2" /> 108 <TextView 109 android:id="@+id/info" 110 android:layout_below="@id/name" 111 android:layout_width="match_parent" 112 android:layout_height="wrap_content" 113 android:visibility="gone" 114 android:textColor="@color/car_caption" 115 style="@style/CarBody1" /> 116 </RelativeLayout> 117 <ImageView 118 android:id="@+id/small_contact_photo" 119 android:background="@drawable/avatar_rounded_bg" 120 android:layout_width="@dimen/in_call_small_contact_photo_size" 121 android:layout_height="@dimen/in_call_small_contact_photo_size" 122 android:layout_gravity="end|top" 123 android:layout_marginTop="@dimen/in_call_info_margin_top" 124 android:layout_marginStart="@dimen/small_contact_photo_margin_start" 125 android:layout_marginEnd="@dimen/small_contact_photo_margin_end" 126 android:scaleType="centerCrop" /> 127 </LinearLayout> 128 <View 129 android:id="@+id/content_separator" 130 android:layout_width="match_parent" 131 android:layout_height="1dp" 132 android:layout_gravity="bottom" 133 android:layout_marginBottom="@dimen/action_panel_height" 134 android:background="@color/separator" /> 135 136 <!-- TODO: Consider flattening out this part and updating logic. --> 137 <FrameLayout 138 android:id="@+id/controls_container" 139 android:layout_width="match_parent" 140 android:layout_height="@dimen/action_panel_height" 141 android:layout_gravity="bottom" > 142 143 <LinearLayout 144 android:id="@+id/ringing_call_controls" 145 android:layout_width="match_parent" 146 android:layout_height="match_parent" 147 android:orientation="horizontal" 148 android:visibility="gone" > 149 <ImageButton 150 android:id="@+id/answer_call_button" 151 android:layout_width="@dimen/stream_fab_size" 152 android:layout_height="@dimen/stream_fab_size" 153 android:layout_gravity="center_vertical" 154 android:scaleType="center" 155 android:elevation="8dp" 156 android:src="@drawable/ic_phone" /> 157 <ImageButton 158 android:id="@+id/reject_call_button" 159 android:layout_width="@dimen/stream_fab_size" 160 android:layout_height="@dimen/stream_fab_size" 161 android:layout_marginStart="@dimen/in_call_button_spacing" 162 android:layout_gravity="center_vertical" 163 android:scaleType="center" 164 android:src="@drawable/ic_call_end" 165 android:tint="#ffff1744" 166 android:background="@drawable/ongoing_call_action_background" /> 167 </LinearLayout> 168 169 <LinearLayout 170 android:id="@+id/active_call_controls" 171 android:layout_width="wrap_content" 172 android:layout_height="match_parent" 173 android:gravity="center_vertical" 174 android:orientation="horizontal" 175 android:visibility="gone" > 176 <ImageButton 177 android:id="@+id/end_call" 178 android:layout_width="@dimen/stream_fab_size" 179 android:layout_height="@dimen/stream_fab_size" 180 android:layout_gravity="center_vertical" 181 android:scaleType="center" 182 android:elevation="8dp" 183 android:src="@drawable/ic_call_end" /> 184 <ImageButton 185 android:id="@+id/unhold_call" 186 android:layout_width="@dimen/stream_fab_size" 187 android:layout_height="@dimen/stream_fab_size" 188 android:layout_gravity="center_vertical" 189 android:scaleType="center" 190 android:elevation="8dp" 191 android:src="@drawable/ic_pause" 192 android:visibility="gone" /> 193 <ImageButton 194 android:id="@+id/mute" 195 android:layout_width="@dimen/stream_fab_size" 196 android:layout_height="@dimen/stream_fab_size" 197 android:layout_marginStart="@dimen/in_call_button_spacing" 198 android:scaleType="center" 199 android:src="@drawable/ic_mute" 200 android:tint="@color/car_tint" 201 android:background="@drawable/ongoing_call_action_background" /> 202 <ImageButton 203 android:id="@+id/toggle_dialpad" 204 android:layout_width="@dimen/stream_fab_size" 205 android:layout_height="@dimen/stream_fab_size" 206 android:layout_marginStart="@dimen/in_call_button_spacing" 207 android:scaleType="center" 208 android:src="@drawable/ic_dialpad" 209 android:tint="@color/car_tint" 210 android:background="@drawable/ongoing_call_action_background" /> 211 </LinearLayout> 212 </FrameLayout> 213 </FrameLayout> 214 215 <LinearLayout 216 android:id="@+id/secondary_call_controls" 217 android:layout_width="@dimen/in_call_large_contact_photo_size" 218 android:layout_height="wrap_content" 219 android:layout_gravity="end|bottom" 220 android:layout_marginBottom="@dimen/card_margin" 221 android:orientation="horizontal" 222 android:gravity="center" 223 android:visibility="gone" > 224 <ImageButton 225 android:id="@+id/swap" 226 android:layout_width="@dimen/stream_fab_size" 227 android:layout_height="@dimen/stream_fab_size" 228 android:scaleType="center" 229 android:src="@drawable/ic_swap_calls" 230 android:background="@drawable/ongoing_call_secondary_action_background" /> 231 <ImageButton 232 android:id="@+id/merge" 233 android:layout_width="@dimen/stream_fab_size" 234 android:layout_height="@dimen/stream_fab_size" 235 android:scaleType="center" 236 android:src="@drawable/ic_call_merge" 237 android:background="@drawable/ongoing_call_secondary_action_background" /> 238 </LinearLayout> 239 </FrameLayout> 240