1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2012 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 17 <!-- In-call onscreen touch UI elements, used on some platforms. 18 19 This layout is a fullscreen overlay, drawn on top of the 20 non-touch-sensitive parts of the in-call UI (i.e. the call card). 21 22 The top-level View here is a InCallTouchUi (FrameLayout) with 2 children: 23 (1) inCallControls: the widgets visible while a regular call (or calls) is in progress 24 (2) incomingCallWidget: the UI displayed while an incoming call is ringing 25 In usual cases, one of these is visible at any given moment. 26 One exception is when incomingCallWidget is fading-out. At that moment, we show 27 inCallControls beneath incomingCallWidget for smoother transition. 28 --> 29 <com.android.phone.InCallTouchUi xmlns:android="http://schemas.android.com/apk/res/android" 30 xmlns:prvandroid="http://schemas.android.com/apk/prv/res/android" 31 android:id="@+id/inCallTouchUi" 32 android:layout_width="match_parent" 33 android:layout_height="match_parent"> 34 35 <!-- 36 (1) inCallControls: the widgets visible while a regular call 37 (or calls) is in progress 38 --> 39 <LinearLayout 40 android:id="@+id/inCallControls" 41 android:layout_width="match_parent" 42 android:layout_height="match_parent" 43 android:visibility="gone"> 44 45 <!-- DTMF dialpad shown in the left part of the screen. 46 This is wrapped in a FrameLayout because otherwise the ViewStub has no width, 47 causing the other buttons to span the full width of the screen --> 48 <FrameLayout 49 android:layout_width="0dp" 50 android:layout_weight="3" 51 android:layout_height="match_parent"> 52 <ViewStub 53 android:id="@+id/dtmf_twelve_key_dialer_stub" 54 android:layout="@layout/dtmf_twelve_key_dialer_view" 55 android:layout_width="match_parent" 56 android:layout_height="match_parent" /> 57 58 <!-- The "extra button row": Rare button used for statues such as conference 59 calls (GSM). Refer to layout(portrait)/incall_touch_ui for more details. 60 When shown, this extra button row hovers over the call card, just above 61 the primary_call_banner of layout-land/primary_call_info. --> 62 <ViewStub 63 android:id="@+id/extraButtonRow" 64 android:layout_gravity="bottom" 65 android:layout_marginBottom="@dimen/call_banner_height" 66 android:layout="@layout/extra_button_row" 67 android:layout_width="match_parent" 68 android:layout_height="wrap_content" /> 69 </FrameLayout> 70 71 <!-- Note: This center margin is repeated in layout-land/incall_screen --> 72 <View 73 android:layout_width="@dimen/dialpad_center_margin" 74 android:layout_height="match_parent" 75 android:background="#66000000" /> 76 77 <!-- Cluster of buttons on the right part of the screen. 78 It is named id/bottomButtons from the naming when in portrait layout. --> 79 <LinearLayout 80 android:id="@+id/bottomButtons" 81 android:background="@drawable/dialpad_background" 82 android:orientation="vertical" 83 android:layout_width="0dp" 84 android:layout_weight="2" 85 android:layout_height="match_parent"> 86 87 <!-- "Audio mode" --> 88 <!-- This is a multi-mode button that can behave either like a 89 simple "compound button" with two states *or* like an 90 action button that brings up a popup menu; see 91 btn_compound_audio.xml and InCallTouchUi.updateAudioButton() 92 for the full details. --> 93 <ToggleButton 94 android:id="@+id/audioButton" 95 android:layout_height="0dp" 96 android:layout_weight="1" 97 android:layout_width="match_parent" 98 style="@style/InCallCompoundButton" 99 android:background="@drawable/btn_compound_audio" 100 android:contentDescription="@string/onscreenAudioText" /> 101 102 <View 103 android:layout_height="@dimen/dialpad_button_margin" 104 android:layout_width="match_parent" 105 android:background="#66000000" /> 106 107 <LinearLayout 108 android:layout_height="0dp" 109 android:layout_weight="1" 110 android:layout_width="match_parent"> 111 <ToggleButton 112 android:id="@+id/muteButton" 113 android:layout_width="0dp" 114 android:layout_weight="1" 115 android:layout_height="match_parent" 116 style="@style/InCallCompoundButton" 117 android:background="@drawable/btn_compound_mute" 118 android:contentDescription="@string/onscreenMuteText" /> 119 <View 120 android:layout_width="@dimen/dialpad_button_margin" 121 android:layout_height="match_parent" 122 android:background="#66000000" /> 123 <!-- This slot is either "Hold" or "Swap", depending on 124 the state of the call. One or the other of these 125 must always be set to GONE. --> 126 <!-- "Hold" --> 127 <!-- This is a "compound button": it has checked and unchecked states. --> 128 <ToggleButton 129 android:id="@+id/holdButton" 130 android:layout_width="0dp" 131 android:layout_weight="1" 132 android:layout_height="match_parent" 133 style="@style/InCallCompoundButton" 134 android:background="@drawable/btn_compound_hold" 135 android:contentDescription="@string/onscreenHoldText" /> 136 <!-- "Swap" (or "Manage calls" in some CDMA states) --> 137 <ImageButton 138 android:id="@+id/swapButton" 139 android:layout_width="0dp" 140 android:layout_weight="1" 141 android:layout_height="match_parent" 142 style="@style/InCallButton" 143 android:src="@drawable/ic_incall_switch_holo_dark" 144 android:contentDescription="@string/onscreenSwapCallsText" /> 145 </LinearLayout> 146 147 <View 148 android:layout_height="@dimen/dialpad_button_margin" 149 android:layout_width="match_parent" 150 android:background="#66000000" /> 151 152 <LinearLayout 153 android:layout_height="0dp" 154 android:layout_weight="1" 155 android:layout_width="match_parent"> 156 <ToggleButton 157 android:id="@+id/dialpadButton" 158 android:layout_width="0dp" 159 android:layout_weight="1" 160 android:layout_height="match_parent" 161 style="@style/InCallCompoundButton" 162 android:background="@drawable/btn_compound_dialpad" 163 android:contentDescription="@string/onscreenShowDialpadText" /> 164 <View 165 android:layout_width="@dimen/dialpad_button_margin" 166 android:layout_height="match_parent" 167 android:background="#66000000" /> 168 <!-- This slot is either "Add" or "Merge", depending on 169 the state of the call. One or the other of these 170 must always be set to GONE. --> 171 <!-- "Add Call" --> 172 <ImageButton 173 android:id="@+id/addButton" 174 android:layout_width="0dp" 175 android:layout_weight="1" 176 android:layout_height="match_parent" 177 style="@style/InCallButton" 178 android:src="@drawable/ic_add_contact_holo_dark" 179 android:contentDescription="@string/onscreenAddCallText" /> 180 <!-- "Merge calls" --> 181 <!-- This button is used only on GSM devices, where we know 182 that "Add" and "Merge" are never available at the same time. 183 The "Merge" button for CDMA devices is "cdmaMergeButton" above. --> 184 <ImageButton 185 android:id="@+id/mergeButton" 186 android:layout_width="0dp" 187 android:layout_weight="1" 188 android:layout_height="match_parent" 189 style="@style/InCallButton" 190 android:src="@drawable/ic_merge_holo_dark" 191 android:contentDescription="@string/onscreenMergeCallsText" /> 192 </LinearLayout> 193 194 <!-- This spacer is not used in GSM, so it has 0 width and height. The CDMA 195 incall_touch_ui_cdma uses it as a spacer when a 5th button is shown. --> 196 <View 197 android:id="@+id/holdSwapSpacer" 198 android:layout_width="0dp" 199 android:layout_height="0dp" /> 200 <View 201 android:layout_height="@dimen/dialpad_button_margin" 202 android:layout_width="match_parent" 203 android:background="#66000000" /> 204 <ImageButton 205 android:id="@+id/endButton" 206 android:layout_height="@dimen/in_call_end_button_height" 207 android:layout_width="match_parent" 208 android:src="@drawable/ic_dial_end_call" 209 android:background="@drawable/end_call_background" 210 android:contentDescription="@string/onscreenEndCallText" /> 211 </LinearLayout> 212 </LinearLayout> 213 214 <!-- 215 (2) incomingCallWidget: the UI displayed while an incoming call is ringing. 216 See InCallTouchUi.showIncomingCallWidget(). 217 218 Layout notes: 219 - Use an opaque black background since we need to cover up 220 a bit of the bottom of the contact photo 221 - The verticalOffset value gets us a little extra space above 222 the topmost "Respond by SMS" icon 223 - The negative layout_marginBottom shifts us slightly downward; 224 we're already aligned with the bottom of the screen, but we 225 don't have an icon in the downward direction so the whole 226 bottom area of this widget is just wasted space. 227 --> 228 <com.android.internal.widget.multiwaveview.GlowPadView 229 android:id="@+id/incomingCallWidget" 230 android:layout_width="wrap_content" 231 android:layout_height="match_parent" 232 android:layout_gravity="right" 233 android:background="@android:color/black" 234 android:visibility="gone" 235 android:gravity="top" 236 237 prvandroid:targetDrawables="@array/incoming_call_widget_3way_targets" 238 prvandroid:targetDescriptions="@array/incoming_call_widget_3way_target_descriptions" 239 prvandroid:directionDescriptions="@array/incoming_call_widget_3way_direction_descriptions" 240 prvandroid:handleDrawable="@drawable/ic_in_call_touch_handle" 241 prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius" 242 prvandroid:outerRadius="@*android:dimen/glowpadview_target_placement_radius" 243 prvandroid:outerRingDrawable="@*android:drawable/ic_lockscreen_outerring" 244 prvandroid:snapMargin="@*android:dimen/glowpadview_snap_margin" 245 prvandroid:vibrationDuration="20" 246 prvandroid:feedbackCount="1" 247 prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius" 248 prvandroid:pointDrawable="@*android:drawable/ic_lockscreen_glowdot" 249 /> 250 251 </com.android.phone.InCallTouchUi> 252