blob: c6bbe5cc6f8c818545dd49fc0e2f32ce7c0d6dbb [file] [log] [blame]
Santos Cordon7d4ddf62013-07-10 11:58:08 -07001<?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 <LinearLayout
88 android:layout_height="0dp"
89 android:layout_weight="1"
90 android:layout_width="match_parent">
91 <!-- "Audio mode" -->
92 <!-- This is a multi-mode button that can behave either like a
93 simple "compound button" with two states *or* like an
94 action button that brings up a popup menu; see
95 btn_compound_audio.xml and InCallTouchUi.updateAudioButton()
96 for the full details. -->
97 <ToggleButton
98 android:id="@+id/audioButton"
99 android:layout_width="0dp"
100 android:layout_weight="1"
101 android:layout_height="match_parent"
102 style="@style/InCallCompoundButton"
103 android:background="@drawable/btn_compound_audio"
104 android:contentDescription="@string/onscreenAudioText" />
105
106 <View
107 android:layout_width="@dimen/dialpad_button_margin"
108 android:layout_height="match_parent"
109 android:background="#66000000" />
110
111 <!-- This slot is either "Hold" or "Swap", depending on
112 the state of the call. One or the other of these
113 must always be set to GONE. -->
114 <!-- "Hold" -->
115 <!-- This is a "compound button": it has checked and unchecked states. -->
116 <ToggleButton
117 android:id="@+id/holdButton"
118 android:layout_width="0dp"
119 android:layout_weight="1"
120 android:layout_height="match_parent"
121 style="@style/InCallCompoundButton"
122 android:background="@drawable/btn_compound_hold"
123 android:contentDescription="@string/onscreenHoldText" />
124 <!-- "Swap" (or "Manage calls" in some CDMA states) -->
125 <ImageButton
126 android:id="@+id/swapButton"
127 android:layout_width="0dp"
128 android:layout_weight="1"
129 android:layout_height="match_parent"
130 style="@style/InCallButton"
131 android:src="@drawable/ic_incall_switch_holo_dark"
132 android:contentDescription="@string/onscreenSwapCallsText" />
133 </LinearLayout>
134
135 <View
136 android:layout_height="@dimen/dialpad_button_margin"
137 android:layout_width="match_parent"
138 android:background="#66000000" />
139
140 <LinearLayout
141 android:layout_height="0dp"
142 android:layout_weight="1"
143 android:layout_width="match_parent">
144 <ToggleButton
145 android:id="@+id/muteButton"
146 android:layout_width="0dp"
147 android:layout_weight="1"
148 android:layout_height="match_parent"
149 style="@style/InCallCompoundButton"
150 android:background="@drawable/btn_compound_mute"
151 android:contentDescription="@string/onscreenMuteText" />
152 <View
153 android:layout_width="@dimen/dialpad_button_margin"
154 android:layout_height="match_parent"
155 android:background="#66000000" />
156
157 <!-- "Video call" -->
158 <ImageButton
159 android:id="@+id/videoCallButton"
160 android:layout_width="0dp"
161 android:layout_weight="1"
162 android:layout_height="match_parent"
163 style="@style/InCallButton"
164 android:src="@drawable/ic_videocall_holo_dark"
165 android:contentDescription="@string/onscreenVideoCallText" />
166 </LinearLayout>
167
168 <View
169 android:layout_height="@dimen/dialpad_button_margin"
170 android:layout_width="match_parent"
171 android:background="#66000000" />
172
173 <LinearLayout
174 android:layout_height="0dp"
175 android:layout_weight="1"
176 android:layout_width="match_parent">
177 <ToggleButton
178 android:id="@+id/dialpadButton"
179 android:layout_width="0dp"
180 android:layout_weight="1"
181 android:layout_height="match_parent"
182 style="@style/InCallCompoundButton"
183 android:background="@drawable/btn_compound_dialpad"
184 android:contentDescription="@string/onscreenShowDialpadText" />
185 <View
186 android:layout_width="@dimen/dialpad_button_margin"
187 android:layout_height="match_parent"
188 android:background="#66000000" />
189 <!-- This slot is either "Add" or "Merge", depending on
190 the state of the call. One or the other of these
191 must always be set to GONE. -->
192 <!-- "Add Call" -->
193 <ImageButton
194 android:id="@+id/addButton"
195 android:layout_width="0dp"
196 android:layout_weight="1"
197 android:layout_height="match_parent"
198 style="@style/InCallButton"
199 android:src="@drawable/ic_add_contact_holo_dark"
200 android:contentDescription="@string/onscreenAddCallText" />
201 <!-- "Merge calls" -->
202 <!-- This button is used only on GSM devices, where we know
203 that "Add" and "Merge" are never available at the same time.
204 The "Merge" button for CDMA devices is "cdmaMergeButton" above. -->
205 <ImageButton
206 android:id="@+id/mergeButton"
207 android:layout_width="0dp"
208 android:layout_weight="1"
209 android:layout_height="match_parent"
210 style="@style/InCallButton"
211 android:src="@drawable/ic_merge_holo_dark"
212 android:contentDescription="@string/onscreenMergeCallsText" />
213 </LinearLayout>
214
215 <!-- This spacer is not used in GSM, so it has 0 width and height. The CDMA
216 incall_touch_ui_cdma uses it as a spacer when a 5th button is shown. -->
217 <View
218 android:id="@+id/holdSwapSpacer"
219 android:layout_width="0dp"
220 android:layout_height="0dp" />
221 <View
222 android:layout_height="@dimen/dialpad_button_margin"
223 android:layout_width="match_parent"
224 android:background="#66000000" />
225 <ImageButton
226 android:id="@+id/endButton"
227 android:layout_height="@dimen/in_call_end_button_height"
228 android:layout_width="match_parent"
229 android:src="@drawable/ic_dial_end_call"
230 android:background="@drawable/end_call_background"
231 android:contentDescription="@string/onscreenEndCallText" />
232 </LinearLayout>
233 </LinearLayout>
234
235 <!--
236 (2) incomingCallWidget: the UI displayed while an incoming call is ringing.
237 See InCallTouchUi.showIncomingCallWidget().
238
239 Layout notes:
240 - Use an opaque black background since we need to cover up
241 a bit of the bottom of the contact photo
242 - The verticalOffset value gets us a little extra space above
243 the topmost "Respond by SMS" icon
244 - The negative layout_marginBottom shifts us slightly downward;
245 we're already aligned with the bottom of the screen, but we
246 don't have an icon in the downward direction so the whole
247 bottom area of this widget is just wasted space.
248 -->
249 <com.android.internal.widget.multiwaveview.GlowPadView
250 android:id="@+id/incomingCallWidget"
251 android:layout_width="wrap_content"
252 android:layout_height="match_parent"
253 android:layout_gravity="right"
254 android:background="@android:color/black"
255 android:visibility="gone"
256 android:gravity="top"
257
258 prvandroid:targetDrawables="@array/incoming_call_widget_3way_targets"
259 prvandroid:targetDescriptions="@array/incoming_call_widget_3way_target_descriptions"
260 prvandroid:directionDescriptions="@array/incoming_call_widget_3way_direction_descriptions"
261 prvandroid:handleDrawable="@drawable/ic_in_call_touch_handle"
262 prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
263 prvandroid:outerRadius="@*android:dimen/glowpadview_target_placement_radius"
264 prvandroid:outerRingDrawable="@*android:drawable/ic_lockscreen_outerring"
265 prvandroid:snapMargin="@*android:dimen/glowpadview_snap_margin"
266 prvandroid:vibrationDuration="20"
267 prvandroid:feedbackCount="1"
268 prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius"
269 prvandroid:pointDrawable="@*android:drawable/ic_lockscreen_glowdot"
270 />
271
272</com.android.phone.InCallTouchUi>