blob: 5d3ea277af74f0b3edddbfa9f708a6cb52789458 [file] [log] [blame]
Santos Cordon7d4ddf62013-07-10 11:58:08 -07001<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2009 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 <!--
37 (1) inCallControls: the widgets visible while a regular call
38 (or calls) is in progress
39 -->
40 <RelativeLayout 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 upper part of the screen
46 (above the main cluster of buttons.) -->
47 <ViewStub android:id="@+id/dtmf_twelve_key_dialer_stub"
48 android:layout="@layout/dtmf_twelve_key_dialer_view"
49 android:layout_width="match_parent"
50 android:layout_height="match_parent"
51 android:layout_above="@+id/bottomButtons"
52 android:layout_marginBottom="@dimen/dialpad_vertical_margin" />
53
54 <!-- Main cluster of onscreen buttons on the lower part of the screen. -->
55 <LinearLayout android:id="@+id/bottomButtons"
56 android:orientation="vertical"
57 android:layout_width="match_parent"
58 android:layout_height="wrap_content"
59 android:layout_alignParentBottom="true">
60
61 <!-- Row 1, the "extra button row": A couple of relatively rare
62 buttons used only in certain call states.
63 Most of the time this whole row is GONE.
64 For now, at least, there's only ever one button visible here
65 at a time, so this can be a simple FrameLayout. -->
66 <ViewStub android:id="@+id/extraButtonRow"
67 android:layout="@layout/extra_button_row"
68 android:layout_width="match_parent"
69 android:layout_height="wrap_content" />
70
71 <!-- Row 2: The "End call" button. -->
72 <ImageButton android:id="@+id/endButton"
73 style="@style/InCallEndButton"
74 android:layout_width="match_parent"
75 android:src="@drawable/ic_dial_end_call"
76 android:background="@drawable/end_call_background"
77 android:contentDescription="@string/onscreenEndCallText" />
78
79 <!-- Row 3: The main batch of in-call buttons:
80 Dialpad / Audio mode / Mute / Hold / Add call
81 Visible in all states except while an incoming call is
82 ringing. -->
83 <LinearLayout
84 android:orientation="horizontal"
85 android:layout_width="match_parent"
86 android:layout_height="wrap_content"
87 android:background="@drawable/dialpad_background"
88 android:paddingStart="@dimen/button_cluster_side_padding"
89 android:paddingEnd="@dimen/button_cluster_side_padding"
90 >
91
92 <!-- This row has either 4 or 5 buttons, depending on
93 whether the device supports "Hold" (i.e. 4 buttons on
94 CDMA devices, 5 buttons on GSM devices.) The buttons
95 are interspersed with 'layout_weight="1"' placeholder
96 views so that they'll be spaced evenly in both cases.
97
98 But note there are a couple of *pairs* of buttons that share a
99 single "slot", namely Hold/Swap and Add/Merge. For these, the
100 code in InCallTouchUi is responsible for making sure that at any
101 point exactly one of the pair is VISIBLE and the other is
102 GONE. -->
103
104 <!-- Separator between left padding and 1st button -->
105 <View style="@style/VerticalSeparator" />
106
107 <!-- "Dialpad" -->
108 <!-- This is a "compound button": it has checked and unchecked states. -->
109 <ToggleButton android:id="@+id/dialpadButton"
110 style="@style/InCallCompoundButton"
111 android:background="@drawable/btn_compound_dialpad"
112 android:contentDescription="@string/onscreenShowDialpadText"
113 />
114
115 <!-- Separator between 1st and 2nd button -->
116 <View style="@style/VerticalSeparator" />
117
118 <!-- "Audio mode" -->
119 <!-- This is a multi-mode button that can behave either like a
120 simple "compound button" with two states *or* like an
121 action button that brings up a popup menu; see
122 btn_compound_audio.xml and InCallTouchUi.updateAudioButton()
123 for the full details. -->
124 <ToggleButton android:id="@+id/audioButton"
125 style="@style/InCallCompoundButton"
126 android:background="@drawable/btn_compound_audio"
127 android:contentDescription="@string/onscreenAudioText"
128 />
129
130 <!-- Separator between 2nd and 3rd button -->
131 <View style="@style/VerticalSeparator" />
132
133 <!-- "Mute" -->
134 <!-- This is a "compound button": it has checked and unchecked states. -->
135 <ToggleButton android:id="@+id/muteButton"
136 style="@style/InCallCompoundButton"
137 android:background="@drawable/btn_compound_mute"
138 android:contentDescription="@string/onscreenMuteText"
139 />
140
141 <!-- Separator between 3rd and 4th button -->
142 <View style="@style/VerticalSeparator" />
143
144 <!-- This slot is either "Hold" or "Swap", depending on
145 the state of the call. One or the other of these
146 must always be set to GONE. -->
147 <!-- "Hold" -->
148 <!-- This is a "compound button": it has checked and unchecked states. -->
149 <ToggleButton android:id="@+id/holdButton"
150 style="@style/InCallCompoundButton"
151 android:background="@drawable/btn_compound_hold"
152 android:contentDescription="@string/onscreenHoldText"
153 />
154 <!-- "Swap" (or "Manage calls" in some CDMA states) -->
155 <ImageButton android:id="@+id/swapButton"
156 style="@style/InCallButton"
157 android:src="@drawable/ic_incall_switch_holo_dark"
158 android:contentDescription="@string/onscreenSwapCallsText"
159 />
160
161 <!-- Separator between 4th and 5th button (if 5th exists) -->
162 <View android:id="@+id/holdSwapSpacer"
163 style="@style/VerticalSeparator" />
164
165 <!-- This slot is either "Add" or "Merge", depending on
166 the state of the call. One or the other of these
167 must always be set to GONE. -->
168 <!-- "Add Call" -->
169 <ImageButton android:id="@+id/addButton"
170 style="@style/InCallButton"
171 android:src="@drawable/ic_add_contact_holo_dark"
172 android:contentDescription="@string/onscreenAddCallText"
173 />
174 <!-- "Merge calls" -->
175 <!-- This button is used only on GSM devices, where we know
176 that "Add" and "Merge" are never available at the same time.
177 The "Merge" button for CDMA devices is "cdmaMergeButton" above. -->
178 <ImageButton android:id="@+id/mergeButton"
179 style="@style/InCallButton"
180 android:src="@drawable/ic_merge_holo_dark"
181 android:contentDescription="@string/onscreenMergeCallsText"
182 />
183
184 <!-- Separator between 5th and 6th button (if 6th exists) -->
185 <View android:id="@+id/videoCallSpacer"
186 style="@style/VerticalSeparator" />
187
188 <!-- This button is use for converting an ongoing call into a video call. -->
189 <ImageButton android:id="@+id/videoCallButton"
190 style="@style/InCallButton"
191 android:src="@drawable/ic_videocall_holo_dark"
192 android:contentDescription="@string/onscreenVideoCallText"
193 />
194
195 <!-- Separator between 4th (or 5th) button and right padding -->
196 <View style="@style/VerticalSeparator" />
197
198 </LinearLayout>
199
200 </LinearLayout>
201
202 </RelativeLayout>
203
204 <!--
205 (2) incomingCallWidget: the UI displayed while an incoming call is ringing.
206 See InCallTouchUi.showIncomingCallWidget().
207
208 Layout notes:
209 - Use an opaque black background since we need to cover up
210 a bit of the bottom of the contact photo
211 - The verticalOffset value gets us a little extra space above
212 the topmost "Respond by SMS" icon
213 - The negative layout_marginBottom shifts us slightly downward;
214 we're already aligned with the bottom of the screen, but we
215 don't have an icon in the downward direction so the whole
216 bottom area of this widget is just wasted space.
217 -->
218 <com.android.internal.widget.multiwaveview.GlowPadView
219 android:id="@+id/incomingCallWidget"
220 android:layout_width="match_parent"
221 android:layout_height="wrap_content"
222 android:layout_gravity="center|bottom"
223 android:layout_marginTop="20dip"
224 android:layout_marginBottom="-46dp"
225 android:background="@android:color/black"
226 android:visibility="gone"
227 android:gravity="top"
228
229 prvandroid:targetDrawables="@array/incoming_call_widget_3way_targets"
230 prvandroid:targetDescriptions="@array/incoming_call_widget_3way_target_descriptions"
231 prvandroid:directionDescriptions="@array/incoming_call_widget_3way_direction_descriptions"
232 prvandroid:handleDrawable="@drawable/ic_in_call_touch_handle"
233 prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
234 prvandroid:outerRadius="@*android:dimen/glowpadview_target_placement_radius"
235 prvandroid:outerRingDrawable="@*android:drawable/ic_lockscreen_outerring"
236 prvandroid:snapMargin="@*android:dimen/glowpadview_snap_margin"
237 prvandroid:vibrationDuration="20"
238 prvandroid:feedbackCount="1"
239 prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius"
240 prvandroid:pointDrawable="@*android:drawable/ic_lockscreen_glowdot"
241 />
242
243</com.android.phone.InCallTouchUi>