Home | History | Annotate | Download | only in layout
      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 
     24 <GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
     25     android:id="@+id/root"
     26     android:orientation="vertical"
     27     android:layout_width="match_parent"
     28     android:layout_height="match_parent"
     29     android:rowCount="7">
     30 
     31     <!-- Column 0: Time, date and status -->
     32     <com.android.internal.widget.DigitalClock android:id="@+id/time"
     33         android:layout_marginTop="8dip"
     34         android:layout_marginBottom="12dip"
     35         android:layout_gravity="right">
     36 
     37         <!-- Because we can't have multi-tone fonts, we render two TextViews, one on
     38         top of the other. Hence the redundant layout... -->
     39         <TextView android:id="@+id/timeDisplayBackground"
     40             android:layout_width="wrap_content"
     41             android:layout_height="wrap_content"
     42             android:singleLine="true"
     43             android:ellipsize="none"
     44             android:textAppearance="?android:attr/textAppearanceMedium"
     45             android:textSize="@dimen/keyguard_lockscreen_clock_font_size"
     46             android:layout_marginBottom="6dip"
     47             android:textColor="@color/lockscreen_clock_background"
     48             />
     49 
     50         <TextView android:id="@+id/timeDisplayForeground"
     51             android:layout_width="wrap_content"
     52             android:layout_height="wrap_content"
     53             android:singleLine="true"
     54             android:ellipsize="none"
     55             android:textAppearance="?android:attr/textAppearanceMedium"
     56             android:textSize="@dimen/keyguard_lockscreen_clock_font_size"
     57             android:layout_marginBottom="6dip"
     58             android:layout_alignLeft="@id/timeDisplayBackground"
     59             android:layout_alignTop="@id/timeDisplayBackground"
     60             android:textColor="@color/lockscreen_clock_foreground"
     61             />
     62 
     63     </com.android.internal.widget.DigitalClock>
     64 
     65     <TextView
     66         android:id="@+id/date"
     67         android:layout_width="0dip"
     68         android:layout_gravity="fill_horizontal"
     69         android:gravity="right"
     70         android:singleLine="true"
     71         android:ellipsize="marquee"
     72         android:textAppearance="?android:attr/textAppearanceMedium"
     73         android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
     74         />
     75 
     76     <TextView
     77         android:id="@+id/alarm_status"
     78         android:singleLine="true"
     79         android:ellipsize="marquee"
     80         android:textAppearance="?android:attr/textAppearanceMedium"
     81         android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
     82         android:layout_gravity="right"
     83         android:drawablePadding="4dip"
     84         />
     85 
     86     <TextView
     87         android:id="@+id/status1"
     88         android:layout_width="0dip"
     89         android:layout_gravity="fill_horizontal"
     90         android:gravity="right"
     91         android:singleLine="true"
     92         android:ellipsize="marquee"
     93         android:textAppearance="?android:attr/textAppearanceMedium"
     94         android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
     95         />
     96 
     97     <Space android:layout_gravity="fill" />
     98 
     99     <TextView android:id="@+id/carrier"
    100         android:layout_width="0dip"
    101         android:layout_gravity="fill_horizontal"
    102         android:gravity="right"
    103         android:singleLine="true"
    104         android:ellipsize="marquee"
    105         android:textAppearance="?android:attr/textAppearanceMedium"
    106         android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
    107         />
    108 
    109     <LinearLayout
    110         style="?android:attr/buttonBarStyle"
    111         android:orientation="vertical"
    112         android:layout_gravity="right">
    113 
    114         <Button android:id="@+id/emergencyCallButton"
    115             style="?android:attr/buttonBarButtonStyle"
    116             android:layout_gravity="right"
    117             android:layout_width="wrap_content"
    118             android:layout_height="0dip"
    119             android:layout_weight="1"
    120             android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
    121             android:text="@string/lockscreen_emergency_call"
    122             android:drawableLeft="@drawable/lockscreen_emergency_button"
    123             android:drawablePadding="0dip"
    124         />
    125 
    126         <Button android:id="@+id/forgotPatternButton"
    127             style="?android:attr/buttonBarButtonStyle"
    128             android:layout_gravity="right"
    129             android:layout_width="wrap_content"
    130             android:layout_height="0dip"
    131             android:layout_weight="1"
    132             android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
    133             android:text="@string/lockscreen_forgot_pattern_button_text"
    134             android:drawableLeft="@drawable/lockscreen_forgot_password_button"
    135             android:drawablePadding="0dip"
    136         />
    137     </LinearLayout>
    138 
    139     <!-- Column 1: lock pattern -->
    140 
    141     <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
    142          android:layout_width="match_parent"
    143          android:layout_height="match_parent"
    144          android:layout_marginTop="8dip"
    145          android:layout_marginRight="8dip"
    146          android:layout_marginBottom="8dip"
    147          android:layout_marginLeft="8dip"
    148          android:layout_rowSpan="7"/>
    149 
    150 
    151     <!-- Music transport control -->
    152     <include android:id="@+id/transport"
    153         layout="@layout/keyguard_transport_control"
    154         android:layout_row="0"
    155         android:layout_column="0"
    156         android:layout_rowSpan="5"
    157         android:layout_columnSpan="1"
    158         android:layout_gravity="fill"
    159         android:layout_width="0dip"
    160         android:layout_height="0dip"
    161         />
    162 
    163     <!-- Area to overlay FaceLock -->
    164     <RelativeLayout
    165         android:id="@+id/faceLockAreaView"
    166         android:visibility="invisible"
    167         android:layout_row="0"
    168         android:layout_column="1"
    169         android:layout_rowSpan="7"
    170         android:layout_columnSpan="1"
    171         android:layout_gravity="fill"
    172         android:layout_marginLeft="8dip"
    173         android:layout_width="0dip"
    174         android:layout_height="0dip"
    175         android:background="@drawable/intro_bg">
    176 
    177         <View
    178             android:id="@+id/spotlightMask"
    179             android:layout_width="match_parent"
    180             android:layout_height="match_parent"
    181             android:background="@color/facelock_spotlight_mask"
    182         />
    183 
    184         <ImageView
    185             android:id="@+id/cancel_button"
    186             android:layout_width="wrap_content"
    187             android:layout_height="wrap_content"
    188             android:padding="5dip"
    189             android:layout_alignParentTop="true"
    190             android:layout_alignParentRight="true"
    191             android:src="@drawable/ic_facial_backup"
    192         />
    193 
    194     </RelativeLayout>
    195 
    196 </GridLayout>
    197