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

Commit 774c2181 authored by Joe Bolinger's avatar Joe Bolinger Committed by Android (Google) Code Review
Browse files

Merge "Set a min height for pattern setup." into sc-v2-dev

parents 6c24e5bc e55568a7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@
            style="@style/LockPatternContainerStyle"
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            android:minHeight="@dimen/choose_lockscreen_min_height"
            android:layout_weight="1">

            <com.android.internal.widget.LockPatternView
+1 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@
                style="@style/LockPatternContainerStyle"
                android:layout_width="wrap_content"
                android:layout_height="0dp"
                android:minHeight="@dimen/choose_lockscreen_min_height"
                android:layout_weight="1">

                <com.android.internal.widget.LockPatternView
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@
                style="@style/LockPatternContainerStyle"
                android:layout_width="wrap_content"
                android:layout_height="0dp"
                android:minHeight="@dimen/choose_lockscreen_min_height"
                android:layout_weight="1">

                <com.android.internal.widget.LockPatternView
+3 −0
Original line number Diff line number Diff line
@@ -313,6 +313,9 @@
         The unit is sp as it is related to the text size of password requirement item. -->
    <dimen name="visible_vertical_space_below_password">20sp</dimen>

    <!-- Minimum height for setting a lock pattern -->
    <dimen name="choose_lockscreen_min_height">200dp</dimen>

    <!-- Select dialog -->
    <dimen name="select_dialog_padding_start">20dp</dimen>
    <dimen name="select_dialog_item_margin_start">12dp</dimen>
+9 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static android.view.View.ACCESSIBILITY_LIVE_REGION_POLITE;
import static com.android.settings.password.ChooseLockSettingsHelper.EXTRA_KEY_UNIFICATION_PROFILE_CREDENTIAL;
import static com.android.settings.password.ChooseLockSettingsHelper.EXTRA_KEY_UNIFICATION_PROFILE_ID;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.settings.SettingsEnums;
import android.content.Context;
@@ -35,6 +36,7 @@ import android.util.Pair;
import android.util.TypedValue;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
@@ -491,11 +493,18 @@ public class ChooseLockPattern extends SettingsActivity {
            getActivity().setTitle(msg);
        }

        @SuppressLint("ClickableViewAccessibility")
        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                Bundle savedInstanceState) {
            final GlifLayout layout = (GlifLayout) inflater.inflate(
                    R.layout.choose_lock_pattern, container, false);
            layout.findViewById(R.id.lockPattern).setOnTouchListener((v, event) -> {
                if (event.getAction() == MotionEvent.ACTION_DOWN) {
                    v.getParent().requestDisallowInterceptTouchEvent(true);
                }
                return false;
            });
            updateActivityTitle();
            layout.setHeaderText(getActivity().getTitle());
            layout.getHeaderTextView().setAccessibilityLiveRegion(ACCESSIBILITY_LIVE_REGION_POLITE);