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

Commit 7cbb8708 authored by Matt Pietal's avatar Matt Pietal
Browse files

PIN Views - Make a bit smaller for better reachability

Align with latest UX guidance, making buttons better spaced and a bit
smaller

Fixes: 182196214
Test: manual
Change-Id: Ibc29e04da3867071d558c7f3643addeb2826b2bc
parent 14a5f1de
Loading
Loading
Loading
Loading
+31 −28
Original line number Diff line number Diff line
@@ -59,124 +59,127 @@
        </com.android.keyguard.AlphaOptimizedRelativeLayout>
        <LinearLayout
                android:id="@+id/row1"
                android:layout_width="match_parent"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"
                >
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key1"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/pinEntry"
                    androidprv:digit="1"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key2"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/pinEntry"
                    androidprv:digit="2"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key3"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    androidprv:textView="@+id/pinEntry"
                    androidprv:digit="3"
                    />
        </LinearLayout>
        <LinearLayout
                android:id="@+id/row2"
                android:layout_width="match_parent"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"
                >
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key4"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/pinEntry"
                    androidprv:digit="4"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key5"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/pinEntry"
                    androidprv:digit="5"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key6"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    androidprv:textView="@+id/pinEntry"
                    androidprv:digit="6"
                    />
        </LinearLayout>
        <LinearLayout
                android:id="@+id/row3"
                android:layout_width="match_parent"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"
                >
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key7"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/pinEntry"
                    androidprv:digit="7"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key8"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/pinEntry"
                    androidprv:digit="8"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key9"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    androidprv:textView="@+id/pinEntry"
                    androidprv:digit="9"
                    />
        </LinearLayout>
        <LinearLayout
                android:id="@+id/row4"
                android:layout_width="match_parent"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_gravity="center_horizontal"
                >
            <com.android.keyguard.NumPadButton
                    android:id="@+id/delete_button"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    android:contentDescription="@string/keyboardview_keycode_delete"
                    style="@style/NumPadKey.Delete"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key0"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/pinEntry"
                    androidprv:digit="0"
                    />
            <com.android.keyguard.NumPadButton
                    android:id="@+id/key_enter"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    style="@style/NumPadKey.Enter"
                    android:contentDescription="@string/keyboardview_keycode_enter"
                    />
+31 −28
Original line number Diff line number Diff line
@@ -71,121 +71,124 @@
                    />
        </RelativeLayout>
        <LinearLayout
                android:layout_width="match_parent"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"
                >
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key1"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/simPinEntry"
                    androidprv:digit="1"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key2"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/simPinEntry"
                    androidprv:digit="2"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key3"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    androidprv:textView="@+id/simPinEntry"
                    androidprv:digit="3"
                    />
        </LinearLayout>
        <LinearLayout
                android:layout_width="match_parent"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"
                >
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key4"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/simPinEntry"
                    androidprv:digit="4"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key5"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/simPinEntry"
                    androidprv:digit="5"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key6"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    androidprv:textView="@+id/simPinEntry"
                    androidprv:digit="6"
                    />
        </LinearLayout>
        <LinearLayout
                android:layout_width="match_parent"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"
                >
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key7"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/simPinEntry"
                    androidprv:digit="7"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key8"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/simPinEntry"
                    androidprv:digit="8"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key9"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    androidprv:textView="@+id/simPinEntry"
                    androidprv:digit="9"
                    />
        </LinearLayout>
        <LinearLayout
                android:layout_width="match_parent"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_gravity="center_horizontal"
                >
            <com.android.keyguard.NumPadButton
                    android:id="@+id/delete_button"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    android:contentDescription="@string/keyboardview_keycode_delete"
                    style="@style/NumPadKey.Delete"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key0"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/simPinEntry"
                    androidprv:digit="0"
                    />
            <com.android.keyguard.NumPadButton
                    android:id="@+id/key_enter"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    style="@style/NumPadKey.Enter"
                    android:contentDescription="@string/keyboardview_keycode_enter"
                    />
+32 −28
Original line number Diff line number Diff line
@@ -72,121 +72,125 @@
                    />
        </RelativeLayout>
        <LinearLayout
                android:layout_width="match_parent"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"
                >
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key1"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/pukEntry"
                    androidprv:digit="1"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key2"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/pukEntry"
                    androidprv:digit="2"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key3"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    androidprv:textView="@+id/pukEntry"
                    androidprv:digit="3"
                    />
        </LinearLayout>
        <LinearLayout
                android:layout_width="match_parent"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"

                >
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key4"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/pukEntry"
                    androidprv:digit="4"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key5"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/pukEntry"
                    androidprv:digit="5"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key6"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    androidprv:textView="@+id/pukEntry"
                    androidprv:digit="6"
                    />
        </LinearLayout>
        <LinearLayout
                android:layout_width="match_parent"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="@dimen/num_pad_row_margin_bottom"
                >
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key7"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/pukEntry"
                    androidprv:digit="7"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key8"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/pukEntry"
                    androidprv:digit="8"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key9"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    androidprv:textView="@+id/pukEntry"
                    androidprv:digit="9"
                    />
        </LinearLayout>
        <LinearLayout
                android:layout_width="match_parent"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_gravity="center_horizontal"
                >
            <com.android.keyguard.NumPadButton
                    android:id="@+id/delete_button"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    android:contentDescription="@string/keyboardview_keycode_delete"
                    style="@style/NumPadKey.Delete"
                    />
            <com.android.keyguard.NumPadKey
                    android:id="@+id/key0"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginEnd="@dimen/num_pad_key_margin_end"
                    androidprv:textView="@+id/pukEntry"
                    androidprv:digit="0"
                    />
            <com.android.keyguard.NumPadButton
                    android:id="@+id/key_enter"
                    android:layout_width="0px"
                    android:layout_width="@dimen/num_pad_key_width"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    style="@style/NumPadKey.Enter"
                    android:contentDescription="@string/keyboardview_keycode_enter"
                    />
+24 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2021, 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.
*/
-->
<resources>
    <!-- Spacing around each button used for PIN view -->
    <dimen name="num_pad_key_width">84dp</dimen>
    <dimen name="num_pad_row_margin_bottom">12dp</dimen>
    <dimen name="num_pad_key_margin_end">20dp</dimen>
</resources>
+4 −2
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@

    <!-- Margin around the various security views -->
    <dimen name="keyguard_security_view_top_margin">8dp</dimen>
    <dimen name="keyguard_security_view_lateral_margin">36dp</dimen>
    <dimen name="keyguard_security_view_lateral_margin">20dp</dimen>

    <dimen name="keyguard_eca_top_margin">18dp</dimen>

@@ -87,5 +87,7 @@
    <dimen name="disappear_y_translation">-32dp</dimen>

    <!-- Spacing around each button used for PIN view -->
    <dimen name="num_pad_key_margin">2dp</dimen>
    <dimen name="num_pad_key_width">72dp</dimen>
    <dimen name="num_pad_row_margin_bottom">6dp</dimen>
    <dimen name="num_pad_key_margin_end">12dp</dimen>
</resources>
Loading