]> nv-tegra.nvidia Code Review - android/platform/packages/apps/Phone.git/blob - res/layout/incall_screen.xml
auto import from //depot/cupcake/@132589
[android/platform/packages/apps/Phone.git] / res / layout / incall_screen.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright (C) 2007 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 state of the Phone UI. -->
18 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
19               android:layout_width="fill_parent"
20               android:layout_height="fill_parent"
21               >
22
23     <!-- Main frame containing all in-call UI elements.
24          This is a FrameLayout with 2 children:
25            (1) inCallPanel: the main set of in-call UI elements
26            (2) manageConferencePanel: the "Manage conference" UI
27          Exactly one of these is visible at any given moment.  -->
28     <FrameLayout android:id="@+id/mainFrame"
29         android:layout_width="fill_parent"
30         android:layout_height="fill_parent"
31         android:layout_weight="1"
32         android:paddingTop="10dip"
33         android:paddingLeft="6dip"
34         android:paddingRight="6dip"
35         >
36
37         <!-- (1) inCallPanel: the main set of in-call UI elements -->
38         <RelativeLayout android:id="@+id/inCallPanel"
39                         android:layout_width="fill_parent"
40                         android:layout_height="fill_parent"
41                         >
42
43             <!-- The CallCard (see call_card_popup.xml) is inserted
44                  here from Java code (see initInCallScreen()). -->
45
46             <!-- The hint about the Menu button, anchored to the bottom of
47                  the screen.  This is used only in landscape mode (see
48                  updateMenuButtonHint()); in portrait mode we use the
49                  menuButtonHint built-in to the CallCard. -->
50             <TextView android:id="@+id/menuButtonHint"
51                       android:text="@string/menuButtonKeyboardDialHint"
52                       android:textAppearance="?android:attr/textAppearanceMedium"
53                       android:textColor="?android:attr/textColorSecondary"
54                       android:layout_width="fill_parent"
55                       android:layout_height="wrap_content"
56                       android:gravity="center"
57                       android:visibility="gone"
58                       android:layout_alignParentBottom="true"
59                       />
60
61         </RelativeLayout>  <!-- End of inCallPanel -->
62
63         <!-- Simple, 1 line display for dtmf tones.  In portrait mode, this is just an
64              empty layout, in landscape mode this field fades in and out as needed. -->
65         <include layout="@layout/dtmf_dialer_display"/>
66
67     </FrameLayout>  <!-- End of mainFrame -->
68
69     <!-- (2) manageConferencePanel: the "Manage conference" UI.
70          This panel is displayed when the user clicks the
71          "Manage conference" button while on a conference call. -->
72     <RelativeLayout android:id="@+id/manageConferencePanel"
73                     android:layout_width="fill_parent"
74                     android:layout_height="fill_parent"
75                     android:visibility="gone"
76                     >
77         <!-- This original header (with timer) is currently not being used,
78              but may be of use in the future. -->
79         <!-- Header, including chronometer and List divider -->
80         <Chronometer
81             android:id="@+id/manageConferencePanelHeader"
82             android:textAppearance="?android:attr/textAppearanceLarge"
83             android:textSize="24sp"
84             android:layout_width="fill_parent"
85             android:layout_height="wrap_content"
86             android:gravity="center_horizontal"
87             android:layout_alignParentTop="true"
88             android:layout_marginTop="5dip"
89             android:layout_marginBottom="5dip"
90             android:visibility="gone"/>
91
92         <ImageView
93             android:id="@+id/manageConferencePanelDivider"
94             android:layout_width="fill_parent"
95             android:layout_height="wrap_content"
96             android:src="@android:drawable/divider_horizontal_dark"
97             android:scaleType="fitXY"
98             android:layout_below="@id/manageConferencePanelHeader"
99             android:visibility="gone"/>
100         <!-- End of the original header -->
101
102         <!-- New header, based on the list separator in Contacts. -->
103         <LinearLayout android:id="@+id/manageConferenceHeader"
104             android:layout_width="fill_parent"
105             android:layout_height="wrap_content"
106             android:orientation="vertical">
107
108             <TextView
109                 android:layout_width="fill_parent"
110                 android:layout_height="wrap_content"
111                 android:gravity="center_vertical"
112                 android:background="@android:drawable/dark_header"
113                 android:textColor="?android:attr/textColorSecondary"
114                 android:textStyle="bold"
115                 android:textSize="14sp"
116                 android:paddingLeft="8dip"
117                 android:text="@string/menu_manageConference"/>
118
119             <View
120                 android:layout_width="fill_parent"
121                 android:layout_height="1dip"
122                 android:background="?android:attr/listDivider"/>
123
124         </LinearLayout>  <!-- End of new header -->
125
126         <!-- The scrollview wrapper for the list of callers on
127              the conference call (in case the list gets too long). -->
128         <ScrollView
129             android:id="@+id/conferenceList"
130             android:layout_width="fill_parent"
131             android:layout_height="wrap_content"
132             android:layout_below="@id/manageConferenceHeader"
133             android:layout_marginTop="8dip"
134             android:layout_marginBottom="60dip">
135
136             <!-- The actual list of callers; this embedded LinearLayout
137                  required since scrollview only supports a single child. -->
138             <LinearLayout
139                 android:orientation="vertical"
140                 android:layout_width="fill_parent"
141                 android:layout_height="wrap_content">
142
143                 <!-- A conference can have at most MAX_CALLERS_IN_CONFERENCE (= 5) callers,
144                      so just define all those UI elements here. -->
145
146                 <!-- Caller 0 -->
147                 <include
148                     layout="@layout/caller_in_conference"
149                     android:id="@+id/caller0"/>
150
151                 <!-- Caller 1 -->
152                 <include
153                     layout="@layout/caller_in_conference"
154                     android:id="@+id/caller1"/>
155
156                 <!-- Caller 2 -->
157                 <include
158                     layout="@layout/caller_in_conference"
159                     android:id="@+id/caller2"/>
160
161                 <!-- Caller 3 -->
162                 <include
163                     layout="@layout/caller_in_conference"
164                     android:id="@+id/caller3"/>
165
166                 <!-- Caller 4 -->
167                 <include
168                     layout="@layout/caller_in_conference"
169                     android:id="@+id/caller4"/>
170
171             </LinearLayout>  <!-- End of "list of callers on conference call" -->
172
173         </ScrollView>  <!-- End of scrolling list wrapper for the linear layout -->
174
175         <!-- The grey footer, background behind the "Back to call" button -->
176         <View
177             android:layout_width="fill_parent"
178             android:layout_height="54dip"
179             android:gravity="center_vertical"
180             android:layout_alignParentBottom="true"
181             android:background="@android:drawable/dark_header"/>
182
183         <!-- The "Back to call" button -->
184         <Button android:id="@+id/manage_done"
185             style="?android:attr/buttonStyleSmall"
186             android:text="@string/caller_manage_manage_done_text"
187             android:layout_width="wrap_content"
188             android:layout_height="wrap_content"
189             android:layout_alignParentBottom="true"
190             android:layout_centerHorizontal="true"
191             android:paddingTop="14dip"
192             android:paddingBottom="18dip"
193             android:paddingLeft="42dip"
194             android:paddingRight="42dip"/>
195
196     </RelativeLayout>  <!-- End of manageConferencePanel -->
197
198     <!-- The sliding drawer control containing the DTMF dialpad.
199          Note this isn't a child of mainFrame, which ensures that it'll be
200          able to use the full width of the screen.  (And a SlidingDrawer
201          widget needs to be be a direct child of a FrameLayout anyway.)
202          In portrait mode, this is visible; in landscape mode, this is
203          just an empty layout.-->
204     <include layout="@layout/dtmf_twelve_key_dialer"/>
205
206     <!-- Finally, the "touch lock" overlay, drawn on top of the DTMF
207          dialpad (after some delay) to prevent false touches from
208          triggering DTMF tones.  (When the overlay is up, you need to
209          double-tap the "lock" icon to unlock the dialpad.) -->
210     <RelativeLayout android:id="@+id/touchLockOverlay"
211         android:layout_width="fill_parent"
212         android:layout_height="fill_parent"
213         android:visibility="gone"
214         android:background="#8000"
215         >
216         <!-- Layout note: we could use android:layout_centerInParent="true"
217              here to center the lock icon exactly in the middle of the screen.
218              But it actually looks better to have the lock roughly in the
219              middle of the dialpad key area, so instead we position it a
220              fixed distance from the bottom of the screen. -->
221         <TextView android:id="@+id/touchLockIcon"
222             android:layout_width="wrap_content"
223             android:layout_height="wrap_content"
224             android:gravity="center"
225             android:layout_alignParentBottom="true"
226             android:layout_centerHorizontal="true"
227             android:layout_marginBottom="70dip"
228             android:text="@string/touchLockText"
229             android:textAppearance="?android:attr/textAppearanceLarge"
230             android:background="@drawable/dialpad_lock"
231             />
232     </RelativeLayout>
233
234 </FrameLayout>