Files
app_Settings/res/layout/face_enroll_accessibility_toggle.xml
MiltonWu 96591ed001 Refine FaceEnrollEducation UI
Update switch button style and adjust the margin for head motion swith
button on the end of FaceEnrollEducation page

Bug: 293274664
Test: Manually check UI
Change-Id: Ifff42364c75bc7c0a83a0211743dcd1e50f04aac
2023-11-08 16:10:53 +08:00

69 lines
2.6 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"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/face_layout_theme">
<!-- Title -->
<com.google.android.setupdesign.view.RichTextView
android:id="@+id/title"
android:layout_marginBottom="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="22sp"
android:letterSpacing="0"
android:minHeight="28dp"
android:fontFamily="@string/sudFontSecondary"
/>
<!-- Subtitle -->
<TextView
android:id="@+id/subtitle"
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:textSize="14sp"
android:letterSpacing="0"
android:minHeight="20dp"
android:fontFamily="@string/sudFontSecondaryText"
android:textColor="?androidprv:attr/materialColorOnSurfaceVariant"/>
<!-- Toggle -->
<com.google.android.material.materialswitch.MaterialSwitch
android:layout_alignParentEnd="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:theme="@style/Theme.Material3.DynamicColors.DayNight"
android:background="@null"
android:id="@+id/toggle"
android:layout_centerVertical="true"
android:checked="true"/>
</RelativeLayout>