summaryrefslogtreecommitdiff
path: root/res/layout-land/incall_touch_ui_cdma.xml
blob: ce96612d27e0cfe54f71601f52ba8afa7a34df86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<!-- In-call onscreen touch UI elements, used on some platforms.

     This layout is a fullscreen overlay, drawn on top of the
     non-touch-sensitive parts of the in-call UI (i.e. the call card).

     The top-level View here is a InCallTouchUi (FrameLayout) with 2 children:
       (1) inCallControls: the widgets visible while a regular call (or calls) is in progress
       (2) incomingCallWidget: the UI displayed while an incoming call is ringing
     In usual cases, one of these is visible at any given moment.
     One exception is when incomingCallWidget is fading-out. At that moment, we show
     inCallControls beneath incomingCallWidget for smoother transition.
     -->
<com.android.phone.InCallTouchUi xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:prvandroid="http://schemas.android.com/apk/prv/res/android"
    android:id="@+id/inCallTouchUi"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!--
        (1) inCallControls: the widgets visible while a regular call
        (or calls) is in progress
    -->
    <LinearLayout
        android:id="@+id/inCallControls"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone">

        <!-- DTMF dialpad shown in the left part of the screen.
             This is wrapped in a FrameLayout because otherwise the ViewStub has no width,
             causing the other buttons to span the full width of the screen -->
        <FrameLayout
            android:layout_width="0dp"
            android:layout_weight="3"
            android:layout_height="match_parent">
            <ViewStub
                android:id="@+id/dtmf_twelve_key_dialer_stub"
                android:layout="@layout/dtmf_twelve_key_dialer_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

            <!-- The "extra button row": Rare button used for statues such as conference
                 calls (GSM). Refer to layout(portrait)/incall_touch_ui for more details.
                 When shown, this extra button row hovers over the call card, just above
                 the primary_call_banner of layout-land/primary_call_info.
                 I believe, since this is the CDMA layout, that the button might not be shown. -->
            <ViewStub
                android:id="@+id/extraButtonRow"
                android:layout_gravity="bottom"
                android:layout_marginBottom="@dimen/call_banner_height"
                android:layout="@layout/extra_button_row"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </FrameLayout>

        <!-- Note: This center margin is repeated in layout-land/incall_screen -->
        <View
            android:layout_width="@dimen/dialpad_center_margin"
            android:layout_height="match_parent"
            android:background="#66000000" />

        <!-- Cluster of buttons on the right part of the screen.
             It is named id/bottomButtons from the naming when in portrait layout. -->
        <LinearLayout
            android:id="@+id/bottomButtons"
            android:background="@drawable/dialpad_background"
            android:orientation="vertical"
            android:layout_width="0dp"
            android:layout_weight="2"
            android:layout_height="match_parent">

            <!-- This slot is either "Hold" or "Swap", depending on
                 the state of the call.   One or the other of these
                 must always be set to GONE. -->
            <!-- "Hold" -->
            <!-- This is a "compound button": it has checked and unchecked states. -->
            <ToggleButton
                android:id="@+id/holdButton"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:layout_width="match_parent"
                style="@style/InCallCompoundButton"
                android:background="@drawable/btn_compound_hold"
                android:contentDescription="@string/onscreenHoldText" />
            <!-- "Swap" (or "Manage calls" in some CDMA states) -->
            <ImageButton
                android:id="@+id/swapButton"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:layout_width="match_parent"
                style="@style/InCallButton"
                android:src="@drawable/ic_incall_switch_holo_dark"
                android:contentDescription="@string/onscreenSwapCallsText" />


            <View
                android:id="@+id/holdSwapSpacer"
                android:layout_height="@dimen/dialpad_button_margin"
                android:layout_width="match_parent"
                android:background="#66000000" />

            <LinearLayout
                android:layout_height="0dp"
                android:layout_weight="1"
                android:layout_width="match_parent">
                <ToggleButton
                    android:id="@+id/muteButton"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="match_parent"
                    style="@style/InCallCompoundButton"
                    android:background="@drawable/btn_compound_mute"
                    android:contentDescription="@string/onscreenMuteText" />
                <View
                    android:layout_width="@dimen/dialpad_button_margin"
                    android:layout_height="match_parent"
                    android:background="#66000000" />
                <!-- "Audio mode" -->
                <!-- This is a multi-mode button that can behave either like a
                     simple "compound button" with two states *or* like an
                     action button that brings up a popup menu; see
                     btn_compound_audio.xml and InCallTouchUi.updateAudioButton()
                     for the full details. -->
                <ToggleButton
                    android:id="@+id/audioButton"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="match_parent"
                    style="@style/InCallCompoundButton"
                    android:background="@drawable/btn_compound_audio"
                    android:contentDescription="@string/onscreenAudioText" />
            </LinearLayout>

            <View
                android:layout_height="@dimen/dialpad_button_margin"
                android:layout_width="match_parent"
                android:background="#66000000" />

            <LinearLayout
                android:layout_height="0dp"
                android:layout_weight="1"
                android:layout_width="match_parent">
                <ToggleButton
                    android:id="@+id/dialpadButton"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="match_parent"
                    style="@style/InCallCompoundButton"
                    android:background="@drawable/btn_compound_dialpad"
                    android:contentDescription="@string/onscreenShowDialpadText" />
                <View
                    android:layout_width="@dimen/dialpad_button_margin"
                    android:layout_height="match_parent"
                    android:background="#66000000" />
                <!-- This slot is either "Add" or "Merge", depending on
                     the state of the call.  One or the other of these
                     must always be set to GONE. -->
                <!-- "Add Call" -->
                <ImageButton
                    android:id="@+id/addButton"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="match_parent"
                    style="@style/InCallButton"
                    android:src="@drawable/ic_add_contact_holo_dark"
                    android:contentDescription="@string/onscreenAddCallText" />
                <!-- "Merge calls" -->
                <!-- This button is used only on GSM devices, where we know
                     that "Add" and "Merge" are never available at the same time.
                     The "Merge" button for CDMA devices is "cdmaMergeButton" above. -->
                <ImageButton
                    android:id="@+id/mergeButton"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="match_parent"
                    style="@style/InCallButton"
                    android:src="@drawable/ic_merge_holo_dark"
                    android:contentDescription="@string/onscreenMergeCallsText" />
            </LinearLayout>

            <View
                android:layout_height="@dimen/dialpad_button_margin"
                android:layout_width="match_parent"
                android:background="#66000000" />
            <ImageButton
                android:id="@+id/endButton"
                android:layout_height="@dimen/in_call_end_button_height"
                android:layout_width="match_parent"
                android:src="@drawable/ic_dial_end_call"
                android:background="@drawable/end_call_background"
                android:contentDescription="@string/onscreenEndCallText" />
        </LinearLayout>
    </LinearLayout>

    <!--
        (2) incomingCallWidget: the UI displayed while an incoming call is ringing.
            See InCallTouchUi.showIncomingCallWidget().

            Layout notes:
            - Use an opaque black background since we need to cover up
              a bit of the bottom of the contact photo
            - The verticalOffset value gets us a little extra space above
              the topmost "Respond by SMS" icon
            - The negative layout_marginBottom shifts us slightly downward;
              we're already aligned with the bottom of the screen, but we
              don't have an icon in the downward direction so the whole
              bottom area of this widget is just wasted space.
    -->
    <com.android.internal.widget.multiwaveview.GlowPadView
        android:id="@+id/incomingCallWidget"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="right"
        android:background="@android:color/black"
        android:visibility="gone"
        android:gravity="top"

        prvandroid:targetDrawables="@array/incoming_call_widget_3way_targets"
        prvandroid:targetDescriptions="@array/incoming_call_widget_3way_target_descriptions"
        prvandroid:directionDescriptions="@array/incoming_call_widget_3way_direction_descriptions"
        prvandroid:handleDrawable="@drawable/ic_in_call_touch_handle"
        prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
        prvandroid:outerRadius="@*android:dimen/glowpadview_target_placement_radius"
        prvandroid:outerRingDrawable="@*android:drawable/ic_lockscreen_outerring"
        prvandroid:snapMargin="@*android:dimen/glowpadview_snap_margin"
        prvandroid:vibrationDuration="20"
        prvandroid:feedbackCount="1"
        prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius"
        prvandroid:pointDrawable="@*android:drawable/ic_lockscreen_glowdot"
        />

</com.android.phone.InCallTouchUi>