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