OSDN Git Service

6031e4536e6f0f8c9d83842420113c4d65e6e69d
[android-x86/packages-apps-DeskClock.git] / res / layout / desk_clock.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 <!-- This is the alarm clock in desk dock mode. It shows the time in large
18      type, plus information about active alarms and charge status.  It can
19      also show some additional status information (e.g. weather data).
20      Buttons are provided to access alarms, music, and other useful functions.
21      -->
22 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
23     android:layout_width="fill_parent"
24     android:layout_height="fill_parent"
25     >
26     <LinearLayout
27         android:id="@+id/desk_clock"
28         android:layout_width="fill_parent"
29         android:layout_height="fill_parent"
30         android:orientation="vertical"
31         >
32
33         <!-- Entire display region (everything but bottom buttons) -->
34         <LinearLayout
35             android:orientation="vertical"
36             android:layout_gravity="left"
37             android:layout_weight="1"
38             android:layout_width="fill_parent"
39             android:layout_height="fill_parent"
40             android:layout_marginLeft="20dip"
41             android:layout_marginTop="20dip"
42             android:layout_marginRight="14dip"
43             android:layout_marginBottom="14dip"
44             >
45
46             <!-- across the top: next alarm, nightmode button -->
47             <LinearLayout
48                 android:orientation="horizontal"
49                 android:layout_width="fill_parent"
50                 android:layout_height="wrap_content"
51                 android:layout_weight="0"
52                 android:layout_marginBottom="6dip"
53                 >
54                 <TextView android:id="@+id/nextAlarm"
55                     android:layout_width="wrap_content"
56                     android:layout_height="wrap_content"
57                     android:layout_weight="1"
58                     android:gravity="left"
59                     android:textSize="18sp"
60                     android:textColor="#FFFFFFFF"
61                     android:drawablePadding="6dip"
62                     android:drawableLeft="@android:drawable/ic_lock_idle_alarm"
63                     android:shadowColor="#C0000000"
64                     android:shadowDx="0"
65                     android:shadowDy="0"
66                     android:shadowRadius="3.0"                        
67                     />
68                 <Button android:id="@+id/nightmode_button"
69                     android:layout_weight="0"
70                     android:layout_height="wrap_content"
71                     android:layout_width="wrap_content"
72                     android:text="@string/nightmode_button_title_placeholder"
73                     />
74             </LinearLayout>
75
76
77             <!-- digital clock & date, together -->
78             <LinearLayout
79                 android:orientation="vertical"
80                 android:layout_width="fill_parent"
81                 android:layout_height="wrap_content"
82                 android:layout_weight="1"
83                 android:gravity="left|center_vertical"
84                 android:layout_marginBottom="12dip"
85                 >
86
87                 <com.android.deskclock.DigitalClock android:id="@+id/time"
88                     android:layout_width="wrap_content"
89                     android:layout_height="wrap_content"
90                     android:layout_marginBottom="12dip"
91                     android:layout_marginLeft="-8dip"
92                     >
93                     <!-- negative left margin above accounts for Clockopia's
94                          generous glyph padding -->
95
96                     <TextView android:id="@+id/timeDisplay"
97                         android:layout_width="wrap_content"
98                         android:layout_height="wrap_content"
99                         android:gravity="center"
100                         android:textSize="100sp"
101                         android:textColor="#FFFFFFFF"
102                         android:shadowColor="#C0000000"
103                         android:shadowDx="0"
104                         android:shadowDy="0"
105                         android:shadowRadius="3.0"                        
106                         />
107
108
109                     <TextView android:id="@+id/am_pm"
110                         android:layout_width="wrap_content"
111                         android:layout_height="fill_parent"
112                         android:gravity="bottom"
113                         android:textSize="28sp"
114                         android:singleLine="true"
115                         android:layout_marginLeft="3dip"
116                         android:textColor="#FFFFFFFF"
117                         android:shadowColor="#C0000000"
118                         android:shadowDx="0"
119                         android:shadowDy="0"
120                         android:shadowRadius="3.0"                        
121                         />
122
123                 </com.android.deskclock.DigitalClock>
124
125                 <TextView android:id="@+id/date"
126                     android:layout_width="wrap_content"
127                     android:layout_height="wrap_content"
128                     android:gravity="left"
129                     android:textSize="18sp"
130                     android:textColor="#FFFFFFFF"
131                     android:shadowColor="#C0000000"
132                     android:shadowDx="0"
133                     android:shadowDy="0"
134                     android:shadowRadius="3.0"                        
135                     />
136             
137             </LinearLayout>
138
139             <!-- TODO: weather -->
140             <View android:id="@+id/weather"
141                 android:layout_width="wrap_content"
142                 android:layout_height="100dip"
143                 android:layout_weight="0"
144                 android:background="#C0FF8000"
145                 android:layout_marginBottom="12dip"
146                 />
147
148             <!-- battery/charge status -->
149             <TextView android:id="@+id/battery"
150                 android:layout_width="fill_parent"
151                 android:layout_height="wrap_content"
152                 android:layout_weight="0"
153                 android:gravity="right"
154                 android:textSize="18sp"
155                 android:textColor="#FFFFFFFF"
156                 android:drawablePadding="6dip"
157                 android:shadowColor="#C0000000"
158                 android:shadowDx="0"
159                 android:shadowDy="0"
160                 android:shadowRadius="3.0"                        
161                 />
162
163         </LinearLayout>
164
165         <!-- buttons -->
166         <LinearLayout
167             android:orientation="horizontal"
168             android:layout_width="fill_parent"
169             android:layout_height="wrap_content"
170             android:layout_weight="0"
171             >
172             <!--
173                 android:background="@null"
174                 android:textAppearance="@android:style/TextAppearance.Small.Inverse"
175                 -->
176             <Button android:id="@+id/alarm_button"
177                 android:layout_height="wrap_content"
178                 android:layout_width="fill_parent"
179                 android:layout_weight=".25"
180                 android:text="@string/alarm_button_title_placeholder"
181                 />
182             <Button android:id="@+id/gallery_button"
183                 android:layout_height="wrap_content"
184                 android:layout_width="fill_parent"
185                 android:layout_weight=".25"
186                 android:text="@string/gallery_button_title_placeholder"
187                 />
188             <Button android:id="@+id/music_button"
189                 android:layout_height="wrap_content"
190                 android:layout_width="fill_parent"
191                 android:layout_weight=".25"
192                 android:text="@string/music_button_title_placeholder"
193                 />
194             <Button android:id="@+id/home_button"
195                 android:layout_height="wrap_content"
196                 android:layout_width="fill_parent"
197                 android:layout_weight=".25"
198                 android:text="@string/home_button_title_placeholder"
199                 />
200
201         </LinearLayout>
202
203     </LinearLayout>
204
205     <View android:id="@+id/window_tint"
206         android:layout_width="fill_parent"
207         android:layout_height="fill_parent"
208         android:background="#D0000000"
209         android:visibility="visible"
210         android:clickable="false"
211         />
212
213 </FrameLayout>