OSDN Git Service

Fix http://b/2326879 (drawing glitches)
[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     <!-- the top padding accounts for the status bar area -->
27     <LinearLayout
28         android:id="@+id/desk_clock"
29         android:layout_width="fill_parent"
30         android:layout_height="fill_parent"
31         android:orientation="vertical"
32         android:paddingTop="25dip"
33         >
34
35         <!-- Entire display region (everything but bottom buttons) -->
36         <!-- Left margin is 4 dip shy of desired to allow for the time to
37              "hang off" the left-hand side, accommodating the extra glyph
38              escapement in Clockopia and 3px of text shadow -->
39         <LinearLayout
40             android:orientation="vertical"
41             android:layout_gravity="left"
42             android:layout_weight="1"
43             android:layout_width="fill_parent"
44             android:layout_height="fill_parent"
45             android:layout_marginLeft="22dip"
46             android:layout_marginTop="18dip"
47             android:layout_marginRight="18dip"
48             android:layout_marginBottom="14dip"
49             >
50
51             <!-- across the top: next alarm, nightmode button -->
52             <LinearLayout
53                 android:orientation="horizontal"
54                 android:layout_width="fill_parent"
55                 android:layout_height="wrap_content"
56                 android:layout_weight="0"
57                 android:layout_marginLeft="4dip"
58                 android:layout_marginBottom="6dip"
59                 android:gravity="center_vertical"
60                 >
61                 <TextView android:id="@+id/nextAlarm"
62                     android:layout_width="wrap_content"
63                     android:layout_height="wrap_content"
64                     android:layout_weight="1"
65                     android:gravity="left"
66                     android:textAppearance="?android:attr/textAppearanceMedium"
67                     android:drawablePadding="6dip"
68                     android:drawableLeft="@drawable/ic_lock_idle_alarm"
69                     android:shadowColor="#C0000000"
70                     android:shadowDx="0"
71                     android:shadowDy="0"
72                     android:shadowRadius="3.0"                        
73                     />
74                 <ImageButton android:id="@+id/nightmode_button"
75                     style="@style/RoundTouchButton"
76                     android:layout_weight="0"
77                     android:layout_height="wrap_content"
78                     android:layout_width="wrap_content"
79                     android:src="@drawable/ic_round_brightness"
80                     android:contentDescription="@string/nightmode_button_description"
81                     android:nextFocusDown="@+id/alarm_button"
82                     />
83             </LinearLayout>
84
85             <include layout="@layout/desk_clock_time_date"
86                 android:layout_weight="1"
87                 android:layout_width="wrap_content"
88                 android:layout_height="wrap_content"
89                 />
90
91             <include layout="@layout/desk_clock_weather"
92                 android:layout_width="wrap_content"
93                 android:layout_height="wrap_content"
94                 android:layout_weight="0"
95                 android:layout_marginTop="12dip"
96                 android:layout_marginBottom="40dip"
97                 android:layout_marginLeft="4dip"
98                 />
99
100             <include layout="@layout/desk_clock_battery"
101                 android:layout_height="wrap_content"
102                 android:layout_width="fill_parent"
103                 android:layout_weight="0"
104                 android:layout_marginLeft="4dip"
105                 />
106
107         </LinearLayout>
108
109         <include layout="@layout/desk_clock_buttons" />
110
111     </LinearLayout>
112
113     <View android:id="@+id/window_tint"
114         android:layout_width="fill_parent"
115         android:layout_height="fill_parent"
116         android:background="#CC000000"
117         android:visibility="visible"
118         android:clickable="false"
119         />
120
121 </FrameLayout>