1 <?xml version="1.0" encoding="utf-8"?> 2 3 <!-- 4 ~ Copyright (C) 2014 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 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 20 android:layout_width="match_parent" 21 android:layout_height="match_parent" 22 android:layout_alignParentTop="true" 23 android:layout_alignParentStart="true"> 24 25 <!-- The main content of the CallCard is either one or two "call info" 26 blocks, depending on whether one or two lines are in use. 27 28 The call_info blocks are stacked vertically inside a CallCard (LinearLayout), 29 each with layout_weight="1". If only one line is in use (i.e. the 30 common case) then the 2nd call info will be GONE and thus the 1st one 31 will expand to fill the full height of the CallCard. --> 32 33 <!-- Primary "call card" block, for the foreground call. --> 34 <LinearLayout 35 android:id="@+id/primary_call_info_container" 36 android:layout_width="match_parent" 37 android:layout_height="wrap_content" 38 android:orientation="vertical" 39 android:elevation="@dimen/primary_call_elevation" 40 android:layout_centerHorizontal="true" 41 android:background="@color/incall_call_banner_background_color" 42 android:paddingTop="@dimen/call_banner_primary_call_container_top_padding" 43 android:clipChildren="false" 44 android:clipToPadding="false"> 45 46 <include layout="@layout/primary_call_info" /> 47 48 <fragment android:name="com.android.incallui.CallButtonFragment" 49 android:id="@+id/callButtonFragment" 50 android:layout_width="match_parent" 51 android:layout_height="wrap_content" /> 52 53 <TextView android:id="@+id/connectionServiceMessage" 54 android:layout_width="match_parent" 55 android:layout_height="wrap_content" 56 android:textAppearance="?android:attr/textAppearanceMedium" 57 android:visibility="gone" 58 android:padding="@dimen/call_banner_side_padding" 59 android:background="@android:color/white" /> 60 61 </LinearLayout> 62 63 <FrameLayout 64 android:layout_height="match_parent" 65 android:layout_width="match_parent" 66 android:layout_below="@id/primary_call_info_container" 67 android:id="@+id/call_card_content"> 68 69 <!-- Contact photo for primary call info --> 70 <ImageView android:id="@+id/photo" 71 android:layout_below="@id/primary_call_info_container" 72 android:layout_width="match_parent" 73 android:layout_height="match_parent" 74 android:layout_gravity="center_vertical" 75 android:gravity="top|center_horizontal" 76 android:scaleType="centerCrop" 77 android:importantForAccessibility="no" 78 android:background="@android:color/white" 79 android:src="@drawable/img_no_image_automirrored" /> 80 81 </FrameLayout> 82 83 <fragment android:name="com.android.incallui.VideoCallFragment" 84 android:id="@+id/videoCallFragment" 85 android:layout_alignParentTop="true" 86 android:layout_gravity="top|center_horizontal" 87 android:layout_width="match_parent" 88 android:layout_height="match_parent" /> 89 90 <!-- Progress spinner, useful for indicating pending operations such as upgrade to video. --> 91 <FrameLayout 92 android:id="@+id/progressSpinner" 93 android:layout_below="@id/primary_call_info_container" 94 android:background="#63000000" 95 android:layout_width="fill_parent" 96 android:layout_height="fill_parent" 97 android:layout_centerHorizontal="true" 98 android:layout_centerVertical="true" 99 android:visibility="gone"> 100 101 <ProgressBar 102 android:id="@+id/progress_bar" 103 style="@android:style/Widget.Material.ProgressBar" 104 android:layout_gravity="center" 105 android:layout_width="48dp" 106 android:layout_height="48dp" 107 android:indeterminate="true" /> 108 109 </FrameLayout> 110 111 <!-- Secondary "Call info" block, for the background ("on hold") call. --> 112 <include layout="@layout/secondary_call_info" /> 113 114 <include layout="@layout/manage_conference_call_button" 115 android:layout_width="match_parent" 116 android:layout_height="wrap_content" 117 android:layout_below="@id/primary_call_info_container" /> 118 119 <!-- Placeholder for various fragments that are added dynamically underneath the caller info. --> 120 <FrameLayout 121 android:id="@+id/answer_and_dialpad_container" 122 android:layout_below="@id/primary_call_info_container" 123 android:layout_gravity="bottom|center_horizontal" 124 android:layout_alignParentBottom="true" 125 android:layout_width="match_parent" 126 android:layout_height="match_parent" 127 android:elevation="@dimen/dialpad_elevation" /> 128 129 <FrameLayout 130 android:id="@+id/floating_end_call_action_button_container" 131 android:layout_width="@dimen/end_call_floating_action_button_diameter" 132 android:layout_height="@dimen/end_call_floating_action_button_diameter" 133 android:background="@drawable/fab_red" 134 android:layout_centerHorizontal="true" 135 android:layout_marginBottom="@dimen/end_call_button_margin_bottom" 136 android:layout_alignParentBottom="true" > 137 138 <ImageButton android:id="@+id/floating_end_call_action_button" 139 android:layout_width="match_parent" 140 android:layout_height="match_parent" 141 android:background="@drawable/end_call_background" 142 android:src="@drawable/fab_ic_end_call" 143 android:scaleType="center" 144 android:contentDescription="@string/onscreenEndCallText" /> 145 146 </FrameLayout> 147 148 </RelativeLayout> 149