keyguard_screen_unlock_portrait.xml revision 5750b1ffb7ce853b7b53c9522cd8666e2a4c6575
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="@dimen/keyguard_lockscreen_status_line_clockfont_bottom_margin"
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:textColor="@color/lockscreen_clock_background"
46            />
47
48        <TextView android:id="@+id/timeDisplayForeground"
49            android:layout_width="wrap_content"
50            android:layout_height="wrap_content"
51            android:singleLine="true"
52            android:ellipsize="none"
53            android:textSize="@dimen/keyguard_lockscreen_clock_font_size"
54            android:textAppearance="?android:attr/textAppearanceMedium"
55            android:textColor="@color/lockscreen_clock_foreground"
56            />
57
58    </com.android.internal.widget.DigitalClock>
59
60    <LinearLayout
61        android:orientation="horizontal"
62        android:layout_gravity="right"
63        android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin">
64
65        <TextView
66            android:id="@+id/date"
67            android:layout_width="wrap_content"
68            android:layout_height="wrap_content"
69            android:singleLine="true"
70            android:ellipsize="marquee"
71            android:textAppearance="?android:attr/textAppearanceMedium"
72            android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
73            />
74
75        <TextView
76            android:id="@+id/alarm_status"
77            android:layout_width="wrap_content"
78            android:layout_height="wrap_content"
79            android:layout_marginLeft="16dip"
80            android:singleLine="true"
81            android:ellipsize="marquee"
82            android:textAppearance="?android:attr/textAppearanceMedium"
83            android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
84            android:drawablePadding="4dip"
85            />
86
87    </LinearLayout>
88
89
90    <TextView
91        android:id="@+id/status1"
92        android:layout_gravity="right"
93        android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin"
94        android:singleLine="true"
95        android:ellipsize="marquee"
96        android:textAppearance="?android:attr/textAppearanceMedium"
97        android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
98        android:drawablePadding="4dip"
99        />
100
101    <Space android:layout_gravity="fill" />
102
103    <!-- We need MATCH_PARENT here only to force the size of the parent to be passed to
104    the pattern view for it to compute its size. This is an unusual case, caused by
105    LockPatternView's requirement to maintain a square aspect ratio based on the width
106    of the screen. -->
107    <com.android.internal.widget.LockPatternView
108        android:id="@+id/lockPattern"
109        android:layout_width="match_parent"
110        android:layout_height="match_parent"
111        android:layout_marginRight="8dip"
112        android:layout_marginBottom="4dip"
113        android:layout_marginLeft="8dip"
114        android:layout_gravity="center_horizontal"
115     />
116
117    <TextView
118        android:id="@+id/carrier"
119        android:layout_gravity="center_horizontal"
120        android:singleLine="true"
121        android:ellipsize="marquee"
122        android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
123        android:textAppearance="?android:attr/textAppearanceMedium"
124    />
125
126    <!-- Footer: an emergency call button and an initially hidden "Forgot pattern" button -->
127    <LinearLayout
128        android:orientation="horizontal"
129        android:layout_width="match_parent"
130        style="?android:attr/buttonBarStyle"
131        android:gravity="center"
132        android:weightSum="2">
133
134        <Button android:id="@+id/emergencyCallButton"
135            android:layout_gravity="center_horizontal"
136            android:layout_width="0dip"
137            android:layout_height="wrap_content"
138            android:layout_weight="1"
139            style="?android:attr/buttonBarButtonStyle"
140            android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
141            android:text="@string/lockscreen_emergency_call"
142            android:drawableLeft="@drawable/lockscreen_emergency_button"
143            android:drawablePadding="0dip"
144        />
145
146        <Button android:id="@+id/forgotPatternButton"
147            android:layout_gravity="center_horizontal"
148            android:layout_width="0dip"
149            android:layout_height="wrap_content"
150            android:layout_weight="1"
151            style="?android:attr/buttonBarButtonStyle"
152            android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
153            android:text="@string/lockscreen_forgot_pattern_button_text"
154            android:drawableLeft="@drawable/lockscreen_forgot_password_button"
155            android:drawablePadding="0dip"
156        />
157
158    </LinearLayout>
159
160    <!-- Music transport control -->
161    <include android:id="@+id/transport"
162        layout="@layout/keyguard_transport_control"
163        android:layout_row="0"
164        android:layout_column="0"
165        android:layout_rowSpan="4"
166        android:layout_columnSpan="1"
167        android:layout_gravity="fill"
168        android:layout_width="0dip"
169        android:layout_height="0dip"
170        />
171
172    <!-- Area to overlay FaceLock -->
173    <TextView android:id="@+id/faceLockAreaView"
174        android:visibility="invisible"
175        android:layout_row="4"
176        android:layout_column="0"
177        android:layout_rowSpan="1"
178        android:layout_columnSpan="1"
179        android:layout_gravity="fill"
180        android:layout_marginTop="8dip"
181        android:layout_marginBottom="8dip"
182        android:layout_width="0dip"
183        android:layout_height="0dip"
184        android:background="@color/facelock_color_background"
185    />
186
187</GridLayout>
188