OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / packages / apps / Phone / res / layout / incall_touch_ui.xml
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="match_parent"
29     android:layout_height="match_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="match_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="match_parent"
48                     android:layout_height="match_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                     android:contentDescription="@string/onscreenHoldText" />
69             <TextView android:id="@+id/holdButtonLabel"
70                     style="@style/InCallRoundButtonLabel" />
71         </LinearLayout>
72
73         <!-- "Swap" (upper left) -->
74         <!-- This button's label changes to "Manage calls" in some CDMA states. -->
75         <LinearLayout android:id="@+id/swapButtonContainer"
76                 style="@style/InCallRoundButtonContainer"
77                 android:layout_alignParentLeft="true"
78                 android:layout_marginLeft="10dip"
79                 android:visibility="gone">
80             <ImageButton android:id="@+id/swapButton"
81                     style="@style/InCallRoundTouchButton"
82                     android:src="@drawable/ic_in_call_touch_round_swap"
83                     android:contentDescription="@string/onscreenSwapCallsText"/>
84             <TextView android:id="@+id/swapButtonLabel"
85                 style="@style/InCallRoundButtonLabel" />
86         </LinearLayout>
87
88         <!-- CDMA-specific "Merge" (upper left) -->
89         <!-- This button is used only on CDMA devices, where we can't use
90              the Merge button in the main cluster (because the "Add Call"
91              button might need to be enabled at the same time.) -->
92         <LinearLayout android:id="@+id/cdmaMergeButtonContainer"
93                 style="@style/InCallRoundButtonContainer"
94                 android:layout_alignParentLeft="true"
95                 android:layout_marginLeft="10dip"
96                 android:visibility="gone">
97             <ImageButton android:id="@+id/cdmaMergeButton"
98                     style="@style/InCallRoundTouchButton"
99                     android:src="@drawable/ic_in_call_touch_round_merge_call"
100                     android:contentDescription="@string/onscreenMergeCallsText" />
101             <TextView
102                 style="@style/InCallRoundButtonLabel"
103                 android:text="@string/onscreenMergeCallsText" />
104         </LinearLayout>
105
106         <!-- DTMF dialpad shown in the upper part of the screen
107              (above the main cluster of buttons.) -->
108         <!-- TODO: this should be a ViewStub, and should only get inflated
109              when first needed. -->
110         <include layout="@layout/non_drawer_dialpad"/>
111
112         <!-- Main cluster of onscreen buttons on the lower part of the screen. -->
113         <LinearLayout android:id="@+id/bottomButtons"
114                       android:orientation="vertical"
115                       android:layout_width="match_parent"
116                       android:layout_height="wrap_content"
117                       android:layout_alignParentBottom="true"
118                       android:paddingLeft="4dip"
119                       android:paddingRight="4dip"
120                       android:paddingBottom="4dip"
121                       >
122
123             <LinearLayout android:id="@+id/inCallControlsRow1"
124                           android:orientation="horizontal"
125                           android:layout_width="match_parent"
126                           android:layout_height="wrap_content"
127                           >
128                 <!-- The buttons in the top row all have an icon *and* a
129                      text label, so we use a <Button> with a "top"
130                      compound drawable (rather than an ImageButton, which
131                      can't have a label.)  Some buttons set the icon image
132                      here; others do it from Java if the image depends on
133                      the current state of the call. -->
134
135                 <!-- The upper-left button in the main cluster is either
136                      "Add" or "Merge", depending on the state of the call. -->
137                 <FrameLayout
138                     android:layout_width="1dip"
139                     android:layout_weight="1"
140                     android:layout_height="wrap_content"
141                     android:layout_marginTop="8dip"
142                     android:layout_marginBottom="8dip"
143                     android:layout_marginLeft="8dip"
144                     android:layout_marginRight="8dip"
145                     >
146                     <!-- "Add Call" -->
147                     <Button android:id="@+id/addButton"
148                             style="@style/InCallTouchButton"
149                             android:layout_width="match_parent"
150                             android:layout_height="wrap_content"
151                             android:layout_marginTop="0dip"
152                             android:layout_marginBottom="0dip"
153                             android:layout_marginLeft="0dip"
154                             android:layout_marginRight="0dip"
155                             android:text="@string/onscreenAddCallText"
156                             android:drawableTop="@drawable/ic_in_call_touch_add_call"
157                             />
158                     <!-- "Merge calls" -->
159                     <!-- This button is used only on GSM devices, where we know
160                          that "Add" and "Merge" are never available at the same time.
161                          The "Merge" button for CDMA devices is "cdmaMergeButton" above. -->
162                     <Button android:id="@+id/mergeButton"
163                             style="@style/InCallTouchButton"
164                             android:layout_width="match_parent"
165                             android:layout_height="wrap_content"
166                             android:layout_marginTop="0dip"
167                             android:layout_marginBottom="0dip"
168                             android:layout_marginLeft="0dip"
169                             android:layout_marginRight="0dip"
170                             android:text="@string/onscreenMergeCallsText"
171                             android:drawableTop="@drawable/ic_in_call_touch_merge_call"
172                             />
173                 </FrameLayout>
174
175                 <!-- "End call" -->
176                 <Button android:id="@+id/endButton"
177                         style="@style/InCallTouchButton"
178                         android:layout_width="1dip"
179                         android:layout_weight="1"
180                         android:layout_height="wrap_content"
181                         android:text="@string/onscreenEndCallText"
182                         android:drawableTop="@drawable/ic_in_call_touch_end"
183                         android:textColor="@color/incall_endButtonLabel"
184                         />
185
186                 <!-- "Dialpad" -->
187                 <Button android:id="@+id/dialpadButton"
188                         style="@style/InCallTouchButton"
189                         android:layout_width="1dip"
190                         android:layout_weight="1"
191                         android:layout_height="wrap_content"
192                         android:text="@string/onscreenShowDialpadText"
193                         />
194             </LinearLayout>
195             <LinearLayout android:id="@+id/inCallControlsRow2"
196                           android:orientation="horizontal"
197                           android:layout_width="match_parent"
198                           android:layout_height="wrap_content"
199                           >
200                 <!-- "Bluetooth" -->
201                 <ToggleButton android:id="@+id/bluetoothButton"
202                         style="@style/InCallTouchToggleButton"
203                         android:layout_width="1dip"
204                         android:layout_weight="1"
205                         android:layout_height="wrap_content"
206                         android:textOn="@string/onscreenBluetoothText"
207                         android:textOff="@string/onscreenBluetoothText"
208                         />
209                 <!-- "Mute" -->
210                 <ToggleButton android:id="@+id/muteButton"
211                         style="@style/InCallTouchToggleButton"
212                         android:layout_width="1dip"
213                         android:layout_weight="1"
214                         android:layout_height="wrap_content"
215                         android:textOn="@string/onscreenMuteText"
216                         android:textOff="@string/onscreenMuteText"
217                         />
218                 <!-- "Speaker" -->
219                 <ToggleButton android:id="@+id/speakerButton"
220                         style="@style/InCallTouchToggleButton"
221                         android:layout_width="1dip"
222                         android:layout_weight="1"
223                         android:layout_height="wrap_content"
224                         android:textOn="@string/onscreenSpeakerText"
225                         android:textOff="@string/onscreenSpeakerText"
226                         />
227             </LinearLayout>
228
229         </LinearLayout>
230
231     </RelativeLayout>
232
233 </RelativeLayout>