| <?xml version="1.0" encoding="utf-8"?> |
| <!-- Copyright (C) 2015 The Android Open Source Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <FrameLayout |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| xmlns:app="http://schemas.android.com/apk/res-auto" |
| android:layout_width="match_parent" |
| android:layout_height="match_parent" > |
| |
| <ImageView |
| android:id="@+id/large_contact_photo" |
| android:layout_width="@dimen/in_call_large_contact_photo_size" |
| android:layout_height="match_parent" |
| android:layout_gravity="end" |
| android:alpha=".20" |
| android:scaleType="centerCrop" /> |
| |
| <View |
| android:layout_width="@dimen/in_call_large_contact_photo_size" |
| android:layout_height="wrap_content" |
| android:layout_gravity="end" |
| android:background="@drawable/contact_photo_gradient" /> |
| |
| <FrameLayout |
| android:background="@color/telecom_display_scrim" |
| android:layout_width="match_parent" |
| android:layout_height="match_parent" /> |
| |
| <RelativeLayout |
| android:id="@+id/secondary_call_container" |
| android:layout_width="@dimen/in_call_large_contact_photo_size" |
| android:layout_height="match_parent" |
| android:layout_gravity="right" |
| android:paddingTop="128dp" |
| android:paddingStart="48dp" |
| android:background="@color/secondary_call_scrim" |
| android:visibility="gone" > |
| <TextView |
| android:id="@+id/name_secondary" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:maxWidth="@dimen/in_call_text_max_width" |
| android:textAppearance="@style/TextAppearance.Car.Headline2" |
| android:textColor="@color/car_headline1_light" /> |
| <TextView |
| android:id="@+id/info_secondary" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_marginTop="4dp" |
| android:layout_below="@id/name_secondary" |
| android:maxWidth="@dimen/in_call_text_max_width" |
| android:alpha="0.6" |
| style="@style/TextAppearance.Car.Body2" |
| android:textColor="@color/car_grey_100" /> |
| </RelativeLayout> |
| |
| <!-- In call dialpad --> |
| <androidx.cardview.widget.CardView |
| android:id="@+id/dialpad_container" |
| android:layout_width="@dimen/in_call_card_dialpad_width" |
| android:layout_height="match_parent" |
| android:layout_gravity="top|start" |
| android:layout_marginTop="@dimen/car_app_bar_height" |
| app:cardBackgroundColor="@color/car_card" |
| app:cardCornerRadius="@dimen/in_call_card_dialpad_corner_radius" |
| app:cardElevation="@dimen/in_call_card_elevation" |
| android:visibility="gone" > |
| <include layout="@layout/dialpad" /> |
| </androidx.cardview.widget.CardView> |
| |
| <!-- In call card --> |
| <FrameLayout |
| android:id="@+id/card" |
| android:layout_width="match_parent" |
| android:layout_height="match_parent" |
| android:background="@drawable/in_call_card_background" |
| android:layout_marginTop="@dimen/car_app_bar_height" |
| android:layout_marginEnd="@dimen/in_call_card_margin_right" |
| android:paddingStart="@dimen/in_call_content_card_margin_start" > |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="match_parent" |
| android:orientation="horizontal"> |
| <RelativeLayout |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:layout_weight="1" |
| android:layout_marginTop="@dimen/in_call_info_margin_top" > |
| <TextView |
| android:id="@+id/name" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:ellipsize="end" |
| android:maxLines="2" |
| android:visibility="gone" |
| style="@style/TextAppearance.Car.Headline2" /> |
| <TextView |
| android:id="@+id/info" |
| android:layout_below="@id/name" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:visibility="gone" |
| android:textColor="@color/car_caption" |
| style="@style/TextAppearance.Car.Body1" /> |
| </RelativeLayout> |
| <ImageView |
| android:id="@+id/small_contact_photo" |
| android:background="@drawable/avatar_rounded_bg" |
| android:layout_width="@dimen/in_call_small_contact_photo_size" |
| android:layout_height="@dimen/in_call_small_contact_photo_size" |
| android:layout_gravity="end|top" |
| android:layout_marginTop="@dimen/in_call_info_margin_top" |
| android:layout_marginStart="@dimen/small_contact_photo_margin_start" |
| android:layout_marginEnd="@dimen/small_contact_photo_margin_end" |
| android:scaleType="centerCrop" /> |
| </LinearLayout> |
| <View |
| android:id="@+id/content_separator" |
| android:layout_width="match_parent" |
| android:layout_height="1dp" |
| android:layout_gravity="bottom" |
| android:layout_marginBottom="@dimen/car_action_bar_height" |
| android:background="@color/separator" /> |
| |
| <!-- TODO: Consider flattening out this part and updating logic. --> |
| <FrameLayout |
| android:id="@+id/controls_container" |
| android:layout_width="match_parent" |
| android:layout_height="@dimen/car_action_bar_height" |
| android:layout_gravity="bottom" > |
| |
| <LinearLayout |
| android:id="@+id/ringing_call_controls" |
| android:layout_width="match_parent" |
| android:layout_height="match_parent" |
| android:orientation="horizontal" |
| android:visibility="gone" > |
| <ImageButton |
| android:id="@+id/answer_call_button" |
| android:layout_width="@dimen/dialer_fab_size" |
| android:layout_height="@dimen/dialer_fab_size" |
| android:layout_gravity="center_vertical" |
| android:scaleType="center" |
| android:elevation="8dp" |
| android:src="@drawable/ic_phone" /> |
| <ImageButton |
| android:id="@+id/reject_call_button" |
| android:layout_width="@dimen/dialer_fab_size" |
| android:layout_height="@dimen/dialer_fab_size" |
| android:layout_marginStart="@dimen/in_call_button_spacing" |
| android:layout_gravity="center_vertical" |
| android:scaleType="center" |
| android:src="@drawable/ic_call_end" |
| android:tint="#ffff1744" |
| android:background="@drawable/ongoing_call_action_background" /> |
| </LinearLayout> |
| |
| <LinearLayout |
| android:id="@+id/active_call_controls" |
| android:layout_width="wrap_content" |
| android:layout_height="match_parent" |
| android:gravity="center_vertical" |
| android:orientation="horizontal" |
| android:visibility="gone" > |
| <ImageButton |
| android:id="@+id/end_call" |
| android:layout_width="@dimen/dialer_fab_size" |
| android:layout_height="@dimen/dialer_fab_size" |
| android:layout_gravity="center_vertical" |
| android:scaleType="center" |
| android:elevation="8dp" |
| android:src="@drawable/ic_call_end" /> |
| <ImageButton |
| android:id="@+id/unhold_call" |
| android:layout_width="@dimen/dialer_fab_size" |
| android:layout_height="@dimen/dialer_fab_size" |
| android:layout_gravity="center_vertical" |
| android:scaleType="center" |
| android:elevation="8dp" |
| android:src="@drawable/ic_pause" |
| android:visibility="gone" /> |
| <ImageButton |
| android:id="@+id/mute" |
| android:layout_width="@dimen/dialer_fab_size" |
| android:layout_height="@dimen/dialer_fab_size" |
| android:layout_marginStart="@dimen/in_call_button_spacing" |
| android:scaleType="center" |
| android:src="@drawable/ic_mute" |
| android:tint="@color/car_tint" |
| android:background="@drawable/ongoing_call_action_background" /> |
| <ImageButton |
| android:id="@+id/toggle_dialpad" |
| android:layout_width="@dimen/dialer_fab_size" |
| android:layout_height="@dimen/dialer_fab_size" |
| android:layout_marginStart="@dimen/in_call_button_spacing" |
| android:scaleType="center" |
| android:src="@drawable/ic_dialpad" |
| android:tint="@color/car_tint" |
| android:background="@drawable/ongoing_call_action_background" /> |
| </LinearLayout> |
| </FrameLayout> |
| </FrameLayout> |
| |
| <LinearLayout |
| android:id="@+id/secondary_call_controls" |
| android:layout_width="@dimen/in_call_large_contact_photo_size" |
| android:layout_height="wrap_content" |
| android:layout_gravity="end|bottom" |
| android:layout_marginBottom="@dimen/card_margin" |
| android:orientation="horizontal" |
| android:gravity="center" |
| android:visibility="gone" > |
| <ImageButton |
| android:id="@+id/swap" |
| android:layout_width="@dimen/dialer_fab_size" |
| android:layout_height="@dimen/dialer_fab_size" |
| android:scaleType="center" |
| android:src="@drawable/ic_swap_calls" |
| android:background="@drawable/ongoing_call_secondary_action_background" /> |
| <ImageButton |
| android:id="@+id/merge" |
| android:layout_width="@dimen/dialer_fab_size" |
| android:layout_height="@dimen/dialer_fab_size" |
| android:scaleType="center" |
| android:src="@drawable/ic_call_merge" |
| android:background="@drawable/ongoing_call_secondary_action_background" /> |
| </LinearLayout> |
| </FrameLayout> |