• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?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 FrameLayout with 2 children:
23       (1) incomingCallWidget: the UI displayed while an incoming call is ringing
24       (2) inCallControls: the widgets visible while a regular call (or calls) is in progress
25     Exactly one of these is visible at any given moment.
26     -->
27<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
28    android:layout_width="fill_parent"
29    android:layout_height="fill_parent"
30    >
31
32    <!-- (1) incomingCallWidget: the UI displayed while an incoming call is ringing. -->
33    <com.android.internal.widget.SlidingTab
34        android:id="@+id/incomingCallWidget"
35        android:layout_width="fill_parent"
36        android:layout_height="wrap_content"
37        android:visibility="gone"
38        android:layout_alignParentBottom="true"
39        android:layout_marginBottom="80dip"
40        />
41
42    <!--
43        (2) inCallControls: the widgets visible while a regular call
44        (or calls) is in progress
45    -->
46    <RelativeLayout android:id="@+id/inCallControls"
47                    android:layout_width="fill_parent"
48                    android:layout_height="fill_parent"
49                    android:layout_alignParentTop="true"
50                    android:visibility="gone"
51                    >
52        <!-- Buttons visible in the upper corners of the screen (in some states). -->
53        <!-- These are small round ImageButtons with a text label floating
54             off to the side. -->
55
56        <!-- "Hold" (upper left) -->
57        <!-- (Note "Hold", "Swap" and "Merge" are never available at
58             the same time.  That's why it's OK for them to be in the
59             same position onscreen.) -->
60        <LinearLayout android:id="@+id/holdButtonContainer"
61                style="@style/InCallRoundButtonContainer"
62                android:layout_alignParentLeft="true"
63                android:layout_marginLeft="10dip"
64                android:visibility="gone">
65            <ImageButton android:id="@+id/holdButton"
66                    style="@style/InCallRoundTouchButton"
67                    android:src="@drawable/ic_in_call_touch_round_hold" />
68            <TextView android:id="@+id/holdButtonLabel"
69                    style="@style/InCallRoundButtonLabel" />
70        </LinearLayout>
71
72        <!-- "Swap" (upper left) -->
73        <LinearLayout android:id="@+id/swapButtonContainer"
74                style="@style/InCallRoundButtonContainer"
75                android:layout_alignParentLeft="true"
76                android:layout_marginLeft="10dip"
77                android:visibility="gone">
78            <ImageButton android:id="@+id/swapButton"
79                    style="@style/InCallRoundTouchButton"
80                    android:src="@drawable/ic_in_call_touch_round_swap" />
81            <TextView android:id="@+id/swapButtonLabel"
82                style="@style/InCallRoundButtonLabel" />
83        </LinearLayout>
84
85        <!-- "Merge" (upper left) CDMA specific -->
86        <LinearLayout android:id="@+id/cdmaMergeButtonContainer"
87                style="@style/InCallRoundButtonContainer"
88                android:layout_alignParentLeft="true"
89                android:layout_marginLeft="10dip"
90                android:visibility="gone">
91            <ImageButton android:id="@+id/cdmaMergeButton"
92                    style="@style/InCallRoundTouchButton"
93                    android:src="@drawable/ic_in_call_touch_round_merge_call" />
94            <TextView
95                style="@style/InCallRoundButtonLabel"
96                android:text="@string/onscreenMergeCallsText" />
97        </LinearLayout>
98
99        <!-- DTMF dialpad shown in the upper part of the screen
100             (above the main cluster of buttons.) -->
101        <!-- TODO: this should be a ViewStub, and should only get inflated
102             when first needed. -->
103        <include layout="@layout/non_drawer_dialpad"/>
104
105        <!-- Main cluster of onscreen buttons on the lower part of the screen. -->
106        <LinearLayout android:id="@+id/bottomButtons"
107                      android:orientation="vertical"
108                      android:layout_width="fill_parent"
109                      android:layout_height="wrap_content"
110                      android:layout_alignParentBottom="true"
111                      android:paddingLeft="4dip"
112                      android:paddingRight="4dip"
113                      android:paddingBottom="4dip"
114                      >
115
116            <LinearLayout android:id="@+id/inCallControlsRow1"
117                          android:orientation="horizontal"
118                          android:layout_width="fill_parent"
119                          android:layout_height="wrap_content"
120                          >
121                <!-- The buttons in the top row all have an icon *and* a
122                     text label, so we use a <Button> with a "top"
123                     compound drawable (rather than an ImageButton, which
124                     can't have a label.)  Some buttons set the icon image
125                     here; others do it from Java if the image depends on
126                     the current state of the call. -->
127
128                <!-- The upper-left button in the main cluster is either
129                     "Add" or "Merge", depending on the state of the call. -->
130                <FrameLayout
131                    android:layout_width="1dip"
132                    android:layout_weight="1"
133                    android:layout_height="wrap_content"
134                    android:layout_marginTop="8dip"
135                    android:layout_marginBottom="8dip"
136                    android:layout_marginLeft="8dip"
137                    android:layout_marginRight="8dip"
138                    >
139                    <!-- "Add Call" -->
140                    <Button android:id="@+id/addButton"
141                            style="@style/InCallTouchButton"
142                            android:layout_width="fill_parent"
143                            android:layout_height="wrap_content"
144                            android:layout_marginTop="0dip"
145                            android:layout_marginBottom="0dip"
146                            android:layout_marginLeft="0dip"
147                            android:layout_marginRight="0dip"
148                            android:text="@string/onscreenAddCallText"
149                            android:drawableTop="@drawable/ic_in_call_touch_add_call"
150                            />
151                    <!-- "Merge calls". GSM specific -->
152                    <Button android:id="@+id/mergeButton"
153                            style="@style/InCallTouchButton"
154                            android:layout_width="fill_parent"
155                            android:layout_height="wrap_content"
156                            android:layout_marginTop="0dip"
157                            android:layout_marginBottom="0dip"
158                            android:layout_marginLeft="0dip"
159                            android:layout_marginRight="0dip"
160                            android:text="@string/onscreenMergeCallsText"
161                            android:drawableTop="@drawable/ic_in_call_touch_merge_call"
162                            />
163                </FrameLayout>
164
165                <!-- "End call" -->
166                <Button android:id="@+id/endButton"
167                        style="@style/InCallTouchButton"
168                        android:layout_width="1dip"
169                        android:layout_weight="1"
170                        android:layout_height="wrap_content"
171                        android:text="@string/onscreenEndCallText"
172                        android:drawableTop="@drawable/ic_in_call_touch_end"
173                        android:textColor="@color/incall_endButtonLabel"
174                        />
175
176                <!-- "Dialpad" -->
177                <Button android:id="@+id/dialpadButton"
178                        style="@style/InCallTouchButton"
179                        android:layout_width="1dip"
180                        android:layout_weight="1"
181                        android:layout_height="wrap_content"
182                        android:text="@string/onscreenShowDialpadText"
183                        />
184            </LinearLayout>
185            <LinearLayout android:id="@+id/inCallControlsRow2"
186                          android:orientation="horizontal"
187                          android:layout_width="fill_parent"
188                          android:layout_height="wrap_content"
189                          >
190                <!-- "Bluetooth" -->
191                <ToggleButton android:id="@+id/bluetoothButton"
192                        style="@style/InCallTouchToggleButton"
193                        android:layout_width="1dip"
194                        android:layout_weight="1"
195                        android:layout_height="wrap_content"
196                        android:textOn="@string/onscreenBluetoothText"
197                        android:textOff="@string/onscreenBluetoothText"
198                        />
199                <!-- "Mute" -->
200                <ToggleButton android:id="@+id/muteButton"
201                        style="@style/InCallTouchToggleButton"
202                        android:layout_width="1dip"
203                        android:layout_weight="1"
204                        android:layout_height="wrap_content"
205                        android:textOn="@string/onscreenMuteText"
206                        android:textOff="@string/onscreenMuteText"
207                        />
208                <!-- "Speaker" -->
209                <ToggleButton android:id="@+id/speakerButton"
210                        style="@style/InCallTouchToggleButton"
211                        android:layout_width="1dip"
212                        android:layout_weight="1"
213                        android:layout_height="wrap_content"
214                        android:textOn="@string/onscreenSpeakerText"
215                        android:textOff="@string/onscreenSpeakerText"
216                        />
217            </LinearLayout>
218
219        </LinearLayout>
220
221    </RelativeLayout>
222
223</RelativeLayout>
224