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