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

Commit aeb199ab authored by Danielle Millett's avatar Danielle Millett
Browse files

Better layouts for security screen setups as part of b/7459863

The major change is that choose pattern and confirm pattern layouts
no longer uses a split screen layout on tablets.  The new layout
closely mimics the layout for portrait.
Other minor changes include:
-Made the header font size for confirm pattern and choose pattern
medium (this matches with face unlock changes).
-Made the buttons on choose pattern for landscape phone side-by-side
rather than above each other (to be consistent with face unlock).
-Removed the black background from phone landscape confirm pattern
since it's inconsistent with all the other layouts.

Change-Id: I4473fe880ac471a3b5bc5399a454b10504589f87
parent 49562681
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@
                style="@style/SecurityPreferenceButtonContainer"
                android:layout_centerHorizontal="true"
                android:layout_alignParentBottom="true"
                android:orientation="vertical">
                android:orientation="horizontal">

                <!-- left / top button: skip, or re-try -->
                <Button android:id="@+id/footerLeftButton"
+1 −2
Original line number Diff line number Diff line
@@ -19,8 +19,7 @@
    android:id="@+id/topLayout"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/black">
    android:layout_height="match_parent">

    <!-- left side: instructions and messages -->
    <LinearLayout
+57 −67
Original line number Diff line number Diff line
@@ -17,31 +17,41 @@
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/topLayout"
    android:orientation="horizontal"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!-- left side: lock pattern widget -->
    <RelativeLayout
        android:layout_width="0dip"
    android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center_horizontal|center_vertical"
        android:orientation="horizontal">
    android:gravity="center_horizontal">

    <!-- header message -->
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:layout_marginTop="14dip">

        <TextView android:id="@+id/headerText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:textAppearance="?android:attr/textAppearanceMedium"/>

    </ScrollView>

    <View
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="0.6"/>

    <!-- lock pattern widget -->
    <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
        android:layout_width="354dip"
        android:layout_height="354dip"
        aspect="square"/>

     </RelativeLayout>

    <!-- right side: instructions and buttons -->
    <RelativeLayout
        android:layout_width="0dip"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center_horizontal">
    <View
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"/>

    <!-- footer message -->
    <TextView android:id="@+id/footerText"
@@ -51,7 +61,7 @@
        android:layout_marginTop="16dip"
        android:layout_toEndOf="@id/lockPattern"
        android:layout_marginStart="100dip"
            android:textAppearance="?android:attr/textAppearanceLarge"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:visibility="gone"/>

    <!-- confirm / restart buttons -->
@@ -73,25 +83,5 @@

    </LinearLayout>

        <!-- header message -->
        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_marginTop="20dip"
            android:layout_marginStart="20dip"
            android:layout_above="@id/buttonContainer"
            android:gravity="center_vertical|center_horizontal">

            <TextView android:id="@+id/headerText"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceLarge"/>

        </ScrollView>


    </RelativeLayout>

</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
+37 −67
Original line number Diff line number Diff line
@@ -16,78 +16,48 @@
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/topLayout"
    android:orientation="horizontal"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!-- left side: lock pattern widget -->
    <RelativeLayout
        android:layout_width="0dip"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center_horizontal|center_vertical"
        android:orientation="horizontal">

        <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
             android:layout_width="354dip"
             android:layout_height="354dip"
             aspect="square"/>

     </RelativeLayout>

    <!-- right side: instructions and buttons -->
    <RelativeLayout
        android:layout_width="0dip"
    android:layout_height="match_parent"
        android:layout_weight="1"
    android:gravity="center_horizontal">

        <!-- confirm / restart buttons -->
        <LinearLayout android:id="@+id/buttonContainer"
            style="@style/SecurityPreferenceButtonContainer"
            android:layout_alignParentEnd="true"
            android:layout_alignParentBottom="true"
            android:orientation="horizontal"
            android:visibility="invisible">

            <!-- left / top button: skip, or re-try -->
            <Button android:id="@+id/footerLeftButton"
                style="@style/SecurityPreferenceButton"
                android:text="@string/lockpattern_restart_button_text"/>
    <!-- header message -->
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:layout_marginTop="40dip">

            <!-- right / bottom button: confirm or ok -->
            <Button android:id="@+id/footerRightButton"
                style="@style/SecurityPreferenceButton"
                android:text="@string/lockpattern_confirm_button_text"/>
        <TextView android:id="@+id/headerText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:textAppearance="?android:attr/textAppearanceMedium"/>

        </LinearLayout>
    </ScrollView>

    <!-- footer message -->
    <TextView android:id="@+id/footerText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
            android:layout_above="@id/buttonContainer"
        android:layout_marginTop="16dip"
            android:textAppearance="?android:attr/textAppearanceLarge"/>
        android:textAppearance="?android:attr/textAppearanceMedium"/>

        <!-- header message -->
        <ScrollView
    <View
        android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_marginTop="20dip"
            android:layout_marginStart="20dip"
            android:layout_above="@id/footerText"
            android:gravity="center_vertical|center_horizontal">
        android:layout_height="0dip"
        android:layout_weight="0.6"/>

            <TextView android:id="@+id/headerText"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textSize="22sp"/>

        </ScrollView>
    <!-- lock pattern widget -->
    <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
        android:layout_width="354dip"
        android:layout_height="354dip"
        aspect="square"/>

    </RelativeLayout>
    <View
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"/>

</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
+5 −3
Original line number Diff line number Diff line
@@ -27,12 +27,14 @@
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:layout_marginTop="96dip">

        <TextView android:id="@+id/headerText"
            android:layout_width="wrap_content"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceLarge"/>
            android:gravity="center"
            android:textAppearance="?android:attr/textAppearanceMedium"/>

    </ScrollView>

@@ -41,7 +43,7 @@
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dip"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:visibility="gone"/>

    <!-- bottom: lock pattern -->
Loading