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

Commit 212dd952 authored by Maurice Lam's avatar Maurice Lam
Browse files

Improve pattern layout for tiiiny screens

On small screens < sw400dp,
- Don't show icon
- Don't show "Screen lock options" button

Test: cd tests/robotests && mma
Bug: 72764729
Change-Id: I8d9863d43c877fcc18f504d91d3183760b3fafc2
parent bee1a6d9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@

            <ImageView
                android:id="@+id/suw_layout_icon"
                style="@style/LockPatternIconStyle"
                style="@style/SuwGlifIcon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/ic_lock" />
@@ -73,6 +73,7 @@
                style="@style/SuwDescription.Glif"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="?attr/suwMarginSides"
                android:minLines="2" />

            <TextView android:id="@+id/headerText"
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@

            <ImageView
                android:id="@+id/suw_layout_icon"
                style="@style/LockPatternIconStyle"
                style="@style/SuwGlifIcon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="?attr/suwGlifHeaderGravity"
+6 −4
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2017 The Android Open Source Project
    Copyright (C) 2018 Google Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -17,7 +17,9 @@

<resources>

    <!-- Unhide the icon on bigger screens -->
    <style name="LockPatternIconStyle" parent="SuwGlifIcon" />
    <!-- Whether to use a UI variant that minimizes the number of UI elements on screen. This is
         typically used when there is not enough space to display everything, because pattern view
         doesn't interact well with scroll view -->
    <bool name="config_lock_pattern_minimal_ui">false</bool>

</resources>
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
@@ -122,4 +122,10 @@

    <!-- Whether or not new device intro suggestion is supported for this device -->
    <bool name="config_new_device_intro_suggestion_supported">false</bool>

    <!-- Whether to use a UI variant that minimizes the number of UI elements on screen. This is
         typically used when there is not enough space to display everything, because pattern view
         doesn't interact well with scroll view -->
    <bool name="config_lock_pattern_minimal_ui">true</bool>

</resources>
+0 −5
Original line number Diff line number Diff line
@@ -457,11 +457,6 @@
        <item name="*android:successColor">@color/setup_lock_pattern_view_success_color_light</item>
    </style>

    <!-- Overridden in sw400dp -->
    <style name="LockPatternIconStyle" parent="SuwGlifIcon">
        <item name="android:visibility">gone</item>
    </style>

    <style name="SuggestionConditionStyle">
        <item name="android:background">@color/suggestion_condition_background</item>
    </style>
Loading