<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2008, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License")
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->

<!-- This is the screen that shows the 9 circle unlock widget and instructs
     the user how to unlock their device, or make an emergency call.  This
     is the portrait layout.  -->
<GridLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center_horizontal">

    <com.android.internal.widget.DigitalClock android:id="@+id/time"
        android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin"
        android:layout_marginBottom="12dip"
        android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin"
        android:layout_gravity="right">

        <!-- Because we can't have multi-tone fonts, we render two TextViews, one on
        top of the other. Hence the redundant layout... -->
        <TextView android:id="@+id/timeDisplayBackground"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="true"
            android:ellipsize="none"
            android:textSize="@dimen/keyguard_lockscreen_clock_font_size"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:layout_marginBottom="6dip"
            android:textColor="@color/lockscreen_clock_background"
            />

        <TextView android:id="@+id/timeDisplayForeground"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="true"
            android:ellipsize="none"
            android:textSize="@dimen/keyguard_lockscreen_clock_font_size"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:layout_marginBottom="6dip"
            android:textColor="@color/lockscreen_clock_foreground"
            />

    </com.android.internal.widget.DigitalClock>

    <LinearLayout
        android:orientation="horizontal"
        android:layout_gravity="right"
        android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin">

        <TextView
            android:id="@+id/date"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
            />

        <TextView
            android:id="@+id/alarm_status"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="16dip"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
            android:drawablePadding="4dip"
            />

    </LinearLayout>


    <TextView
        android:id="@+id/status1"
        android:layout_gravity="right"
        android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
        android:drawablePadding="4dip"
        />

    <Space android:layout_gravity="fill" />

    <!-- We need MATCH_PARENT here only to force the size of the parent to be passed to
    the pattern view for it to compute its size. This is an unusual case, caused by
    LockPatternView's requirement to maintain a square aspect ratio based on the width
    of the screen. -->
    <com.android.internal.widget.LockPatternView
        android:id="@+id/lockPattern"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="8dip"
        android:layout_marginRight="8dip"
        android:layout_marginBottom="4dip"
        android:layout_marginLeft="8dip"
        android:layout_gravity="center|bottom"
     />

    <TextView
        android:id="@+id/carrier"
        android:layout_gravity="center_horizontal"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
        android:textAppearance="?android:attr/textAppearanceMedium"
    />

    <!-- Footer: an emergency call button and an initially hidden "Forgot pattern" button -->
    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        style="?android:attr/buttonBarStyle"
        android:gravity="center"
        android:weightSum="2">

        <Button android:id="@+id/emergencyCallButton"
            android:layout_gravity="center_horizontal"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            style="?android:attr/buttonBarButtonStyle"
            android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
            android:text="@string/lockscreen_emergency_call"
            android:drawableLeft="@drawable/lockscreen_emergency_button"
            android:drawablePadding="0dip"
        />

        <Button android:id="@+id/forgotPatternButton"
            android:layout_gravity="center_horizontal"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            style="?android:attr/buttonBarButtonStyle"
            android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
            android:text="@string/lockscreen_forgot_pattern_button_text"
            android:drawableLeft="@drawable/lockscreen_forgot_password_button"
            android:drawablePadding="0dip"
        />

    </LinearLayout>

    <!-- Music transport control -->
    <include android:id="@+id/transport"
        layout="@layout/keyguard_transport_control"
        android:layout_row="0"
        android:layout_column="0"
        android:layout_rowSpan="4"
        android:layout_columnSpan="1"
        android:layout_gravity="fill"
        android:layout_width="0dip"
        android:layout_height="0dip"
        />

    <!-- Area to overlay FaceLock -->
    <TextView android:id="@+id/faceLockAreaView"
        android:visibility="invisible"
        android:layout_row="4"
        android:layout_column="0"
        android:layout_rowSpan="1"
        android:layout_columnSpan="1"
        android:layout_gravity="fill"
        android:layout_marginTop="8dip"
        android:layout_marginBottom="8dip"
        android:layout_width="0dip"
        android:layout_height="0dip"
        android:background="@color/facelock_color_background"
    />

</GridLayout>
