keyguard_screen_unlock_portrait.xml revision 7da27adf6cb972a54fe0ee10ba2fa3a2974a2c18
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3**
4** Copyright 2008, The Android Open Source Project
5**
6** Licensed under the Apache License, Version 2.0 (the "License")
7** you may not use this file except in compliance with the License.
8** You may obtain a copy of the License at
9**
10**     http://www.apache.org/licenses/LICENSE-2.0
11**
12** Unless required by applicable law or agreed to in writing, software
13** distributed under the License is distributed on an "AS IS" BASIS,
14** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15** See the License for the specific language governing permissions and
16** limitations under the License.
17*/
18-->
19
20<!-- This is the screen that shows the 9 circle unlock widget and instructs
21     the user how to unlock their device, or make an emergency call.  This
22     is the portrait layout.  -->
23<GridLayout
24    xmlns:android="http://schemas.android.com/apk/res/android"
25    android:orientation="vertical"
26    android:layout_width="match_parent"
27    android:layout_height="match_parent"
28    android:gravity="center_horizontal">
29
30    <com.android.internal.widget.DigitalClock android:id="@+id/time"
31        android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin"
32        android:layout_marginBottom="12dip"
33        android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin"
34        android:layout_gravity="right">
35
36        <!-- Because we can't have multi-tone fonts, we render two TextViews, one on
37        top of the other. Hence the redundant layout... -->
38        <TextView android:id="@+id/timeDisplayBackground"
39            android:layout_width="wrap_content"
40            android:layout_height="wrap_content"
41            android:singleLine="true"
42            android:ellipsize="none"
43            android:textSize="@dimen/keyguard_lockscreen_clock_font_size"
44            android:textAppearance="?android:attr/textAppearanceMedium"
45            android:layout_marginBottom="6dip"
46            android:textColor="@color/lockscreen_clock_background"
47            />
48
49        <TextView android:id="@+id/timeDisplayForeground"
50            android:layout_width="wrap_content"
51            android:layout_height="wrap_content"
52            android:singleLine="true"
53            android:ellipsize="none"
54            android:textSize="@dimen/keyguard_lockscreen_clock_font_size"
55            android:textAppearance="?android:attr/textAppearanceMedium"
56            android:layout_marginBottom="6dip"
57            android:textColor="@color/lockscreen_clock_foreground"
58            />
59
60    </com.android.internal.widget.DigitalClock>
61
62    <LinearLayout
63        android:orientation="horizontal"
64        android:layout_gravity="right"
65        android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin">
66
67        <TextView
68            android:id="@+id/date"
69            android:layout_width="wrap_content"
70            android:layout_height="wrap_content"
71            android:singleLine="true"
72            android:ellipsize="marquee"
73            android:textAppearance="?android:attr/textAppearanceMedium"
74            android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
75            />
76
77        <TextView
78            android:id="@+id/alarm_status"
79            android:layout_width="wrap_content"
80            android:layout_height="wrap_content"
81            android:layout_marginLeft="16dip"
82            android:singleLine="true"
83            android:ellipsize="marquee"
84            android:textAppearance="?android:attr/textAppearanceMedium"
85            android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
86            android:drawablePadding="4dip"
87            />
88
89    </LinearLayout>
90
91
92    <TextView
93        android:id="@+id/status1"
94        android:layout_gravity="right"
95        android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin"
96        android:singleLine="true"
97        android:ellipsize="marquee"
98        android:textAppearance="?android:attr/textAppearanceMedium"
99        android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
100        android:drawablePadding="4dip"
101        />
102
103    <Space android:layout_gravity="fill" />
104
105    <!-- We need MATCH_PARENT here only to force the size of the parent to be passed to
106    the pattern view for it to compute its size. This is an unusual case, caused by
107    LockPatternView's requirement to maintain a square aspect ratio based on the width
108    of the screen. -->
109    <com.android.internal.widget.LockPatternView
110        android:id="@+id/lockPattern"
111        android:layout_width="match_parent"
112        android:layout_height="match_parent"
113        android:layout_marginTop="8dip"
114        android:layout_marginRight="8dip"
115        android:layout_marginBottom="4dip"
116        android:layout_marginLeft="8dip"
117        android:layout_gravity="center|bottom"
118     />
119
120    <TextView
121        android:id="@+id/carrier"
122        android:layout_gravity="center_horizontal"
123        android:singleLine="true"
124        android:ellipsize="marquee"
125        android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
126        android:textAppearance="?android:attr/textAppearanceMedium"
127    />
128
129    <!-- Footer: an emergency call button and an initially hidden "Forgot pattern" button -->
130    <LinearLayout
131        android:orientation="horizontal"
132        android:layout_width="match_parent"
133        style="?android:attr/buttonBarStyle"
134        android:gravity="center"
135        android:weightSum="2">
136
137        <Button android:id="@+id/emergencyCallButton"
138            android:layout_gravity="center_horizontal"
139            android:layout_width="0dip"
140            android:layout_height="wrap_content"
141            android:layout_weight="1"
142            style="?android:attr/buttonBarButtonStyle"
143            android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
144            android:text="@string/lockscreen_emergency_call"
145            android:drawableLeft="@drawable/lockscreen_emergency_button"
146            android:drawablePadding="0dip"
147        />
148
149        <Button android:id="@+id/forgotPatternButton"
150            android:layout_gravity="center_horizontal"
151            android:layout_width="0dip"
152            android:layout_height="wrap_content"
153            android:layout_weight="1"
154            style="?android:attr/buttonBarButtonStyle"
155            android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
156            android:text="@string/lockscreen_forgot_pattern_button_text"
157            android:drawableLeft="@drawable/lockscreen_forgot_password_button"
158            android:drawablePadding="0dip"
159        />
160
161    </LinearLayout>
162
163    <!-- Music transport control -->
164    <include android:id="@+id/transport"
165        layout="@layout/keyguard_transport_control"
166        android:layout_row="0"
167        android:layout_column="0"
168        android:layout_rowSpan="4"
169        android:layout_columnSpan="1"
170        android:layout_gravity="fill"
171        android:layout_width="0dip"
172        android:layout_height="0dip"
173        />
174
175</GridLayout>
176