Files
app_Settings/res/layout/face_enroll_accessibility_toggle.xml
Curtis Belmonte d3a07c29bf Fix face education UX for both grid and traffic light
Makes the following adjustments to the UI of the Face Unlock education
screen for both the grid and traffic light enrollment flows:
- Fixes issues with text being overlapped by illustrations
- Prevents views from moving vertically due to state changes
- Ensures no scroll is required for default locale and scaling
- Adjusts the color and content of the a11y setup toggle

Test: Manual:
1. Start grid-based face enrollment (e.g. from Settings > Security)
2. Proceed to "How to set up Face Unlock" screen
3. Tap "Setup for limited vision or head motion"
4. Toggle "Setup for limited vision or head motion" switch off and on
5. Repeat steps 1-4 for traffic light face enrollment

Fixes: 191105436
Fixes: 191317385
Change-Id: Ie80f5b3130b5b0aeceb889f53cc2dec8c7423e47
2021-06-23 16:14:40 -07:00

86 lines
3.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 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.
-->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/face_layout_theme">
<!-- Top divider -->
<View
android:layout_alignParentTop="true"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider" />
<!-- Title -->
<com.google.android.setupdesign.view.RichTextView
android:id="@+id/title"
android:paddingHorizontal="8dp"
android:paddingTop="8dp"
android:paddingBottom="4dp"
android:gravity="start"
android:layout_alignParentStart="true"
android:layout_toStartOf="@+id/toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/sud_description_text_size"
/>
<!-- Subtitle -->
<TextView
android:id="@+id/subtitle"
android:paddingHorizontal="8dp"
android:paddingBottom="8dp"
android:layout_alignParentStart="true"
android:layout_toStartOf="@+id/toggle"
android:layout_below="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/security_settings_face_enroll_introduction_accessibility_expanded"
android:textColor="?android:attr/textColorSecondary"/>
<!-- Vertical divider -->
<View
android:layout_centerVertical="true"
android:layout_alignTop="@+id/toggle"
android:layout_alignBottom="@+id/toggle"
android:layout_toStartOf="@+id/toggle"
android:layout_width="1dp"
android:layout_height="wrap_content"
android:background="?android:attr/listDivider" />
<!-- Toggle -->
<Switch
android:layout_alignParentEnd="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/toggle"
android:layout_centerVertical="true"
android:checked="true"/>
<!-- Bottom divider -->
<View
android:layout_below="@+id/subtitle"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider" />
</RelativeLayout>