OSDN Git Service

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