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

Commit e7eba5d2 authored by Kevin Chyn's avatar Kevin Chyn Committed by Android (Google) Code Review
Browse files

Merge "Update toggle layout and always show footer text" into qt-dev

parents 3225026e 5c2842c1
Loading
Loading
Loading
Loading
+48 −13
Original line number Diff line number Diff line
@@ -14,33 +14,68 @@
     limitations under the License.
-->

<LinearLayout
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingEnd="16dp"
    android:paddingStart="16dp">
    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
        style="@style/SudDescription.Glif"
        android:id="@+id/title"
        android:paddingHorizontal="8dp"
        android:paddingTop="8dp"
        android:gravity="start"
        android:layout_alignParentStart="true"
        android:layout_toLeftOf="@+id/toggle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

    <!-- Subtitle -->
    <TextView
        android:id="@+id/subtitle"
        android:paddingHorizontal="8dp"
        android:paddingBottom="8dp"
        android:layout_alignParentStart="true"
        android:layout_toLeftOf="@+id/toggle"
        android:layout_below="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/title"/>

    <Space
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_weight="1"/>
        android:text="@string/security_settings_face_enroll_introduction_accessibility_expanded"/>

    <!-- 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="match_parent"
        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"/>

</LinearLayout>
    <!-- Bottom divider -->
    <View
        android:layout_below="@+id/subtitle"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="?android:attr/listDivider" />

</RelativeLayout>
+3 −2
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@
            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <Button
                    android:id="@+id/accessibility_button"
                    style="@style/SudGlifButton.Secondary"
@@ -89,7 +90,7 @@
                    android:id="@+id/toggle_diversity"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:visibility="invisible"
                    android:visibility="gone"
                    FaceEnrollAccessibilitySwitch:messageText="@string/security_settings_face_enroll_introduction_accessibility_diversity"/>

            </FrameLayout>
@@ -101,7 +102,7 @@
                android:orientation="horizontal"
                android:paddingStart="16dp"
                android:paddingEnd="16dp"
                android:layout_marginTop="24dp">
                android:paddingTop="24dp">

                <ImageView
                    android:layout_width="wrap_content"
+2 −0
Original line number Diff line number Diff line
@@ -890,6 +890,8 @@
    <string name="security_settings_face_preference_title">Face authentication</string>
    <!-- Button shown which shows accessibility toggles for face enrollment when clicked. [CHAR LIMIT=32] -->
    <string name="security_settings_face_enroll_introduction_accessibility">Use accessibility setup</string>
    <!-- Additional details shown when the accessibility toggle is expanded. [CHAR LIMIT=NONE]-->
    <string name="security_settings_face_enroll_introduction_accessibility_expanded"></string>
    <!-- Message shown for a toggle which when enabled, allows the user to enroll using a simpler flow for accessibility [CHAR LIMIT=NONE] -->
    <string name="security_settings_face_enroll_introduction_accessibility_diversity"></string>
    <!-- Message shown for a toggle which when enabled, allows the user to enroll using a simpler flow for accessibility [CHAR LIMIT=NONE] -->
+0 −2
Original line number Diff line number Diff line
@@ -72,12 +72,10 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {

        mFaceManager = Utils.getFaceManagerOrNull(this);
        final Button accessibilityButton = findViewById(R.id.accessibility_button);
        final View footerView = findViewById(R.id.footer_layout);
        accessibilityButton.setOnClickListener(view -> {
            mSwitchDiversity.setChecked(true);
            accessibilityButton.setVisibility(View.GONE);
            mSwitchDiversity.setVisibility(View.VISIBLE);
            footerView.setVisibility(View.GONE);
        });

        mSwitchDiversity = findViewById(R.id.toggle_diversity);