Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6aa7e44a authored by Jef Oliver's avatar Jef Oliver Committed by Gerrit Code Review
Browse files

Merge "PIN Lockscreen: Fix mdpi layout issues" into jellybean

parents daa2f913 7fcc09d8
Loading
Loading
Loading
Loading
+235 −0
Original line number Diff line number Diff line
<?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.
*/
-->
<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"
    android:id="@+id/root">

    <com.android.internal.widget.DigitalClock android:id="@+id/time"
        android:layout_marginBottom="18dip"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <!-- 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="@*android: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:id="@+id/date_line"
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <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_width="match_parent"
        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"
        android:drawablePadding="4dip"
        android:paddingBottom="4dip"
        />

    <!-- Password entry field -->
    <!-- Note: the entire container is styled to look like the edit field,
         since the backspace/IME switcher looks better inside -->
    <LinearLayout
        android:layout_gravity="center_vertical|fill_horizontal"
        android:orientation="horizontal"
        android:background="@drawable/lockscreen_password_field_dark"
        android:layout_marginLeft="16dip"
        android:layout_marginRight="16dip">

        <EditText android:id="@+id/passwordEntry"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center_horizontal"
            android:layout_gravity="center_vertical"
            android:layout_marginLeft="@dimen/keyguard_lockscreen_pin_margin_left"
            android:singleLine="true"
            android:textStyle="normal"
            android:inputType="textPassword"
            android:textSize="36sp"
            android:background="@null"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textColor="#ffffffff"
            android:imeOptions="flagForceAscii|actionDone"
            />

        <!-- This delete button is only visible for numeric PIN entry -->
        <ImageButton android:id="@+id/pinDel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@android:drawable/ic_input_delete"
            android:clickable="true"
            android:padding="8dip"
            android:layout_gravity="center_vertical"
            android:background="?android:attr/selectableItemBackground"
            android:visibility="gone"
            />

        <ImageView android:id="@+id/switch_ime_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/ic_lockscreen_ime"
            android:clickable="true"
            android:padding="8dip"
            android:layout_gravity="center"
            android:background="?android:attr/selectableItemBackground"
            android:visibility="gone"
            />

    </LinearLayout>

    <!-- Numeric keyboard -->
    <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
        android:layout_width="match_parent"
        android:layout_marginLeft="4dip"
        android:layout_marginRight="4dip"
        android:paddingTop="2dip"
        android:paddingBottom="2dip"
        android:background="#40000000"
        android:keyBackground="@*android:drawable/btn_keyboard_key_ics"
        android:visibility="gone"
        android:clickable="true"
    />

    <TextView
        android:id="@+id/carrier"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
        android:drawablePadding="0dip"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:paddingTop="0dip"
        />

    <Button
        android:id="@+id/emergencyCallButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="4dip"
        android:layout_gravity="center_horizontal"
        android:drawableLeft="@*android:drawable/lockscreen_emergency_button"
        style="?android:attr/buttonBarButtonStyle"
        android:drawablePadding="4dip"
        android:text="@*android:string/lockscreen_emergency_call"
        android:visibility="gone"
        />

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

    <!-- Area to overlay FaceLock -->
    <RelativeLayout
        android:id="@+id/faceLockAreaView"
        android:visibility="invisible"
        android:layout_row="3"
        android:layout_column="0"
        android:layout_rowSpan="2"
        android:layout_columnSpan="1"
        android:layout_gravity="fill"
        android:layout_width="0dip"
        android:layout_height="0dip"
        android:background="@drawable/intro_bg">

        <View
            android:id="@+id/spotlightMask"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/facelock_spotlight_mask"
        />

        <ImageView
            android:id="@+id/cancel_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="5dip"
            android:layout_alignParentTop="true"
            android:layout_alignParentRight="true"
            android:src="@drawable/ic_facial_backup"
        />

     </RelativeLayout>

</GridLayout>