Update toggle layout and always show footer text
Fixes: 130740123 Test: Builds Change-Id: I5f64e22ca8123c6f2825d4341d94581a301551f7
This commit is contained in:
@@ -14,33 +14,68 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="horizontal"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:paddingEnd="16dp"
|
style="?attr/face_layout_theme">
|
||||||
android:paddingStart="16dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
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"/>
|
|
||||||
|
|
||||||
|
<!-- Top divider -->
|
||||||
<View
|
<View
|
||||||
android:layout_width="1dp"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_height="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
android:background="?android:attr/listDivider" />
|
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: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="wrap_content"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<!-- Toggle -->
|
||||||
<Switch
|
<Switch
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/toggle"
|
android:id="@+id/toggle"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
android:checked="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>
|
||||||
|
@@ -77,6 +77,7 @@
|
|||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/accessibility_button"
|
android:id="@+id/accessibility_button"
|
||||||
style="@style/SudGlifButton.Secondary"
|
style="@style/SudGlifButton.Secondary"
|
||||||
@@ -89,7 +90,7 @@
|
|||||||
android:id="@+id/toggle_diversity"
|
android:id="@+id/toggle_diversity"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="invisible"
|
android:visibility="gone"
|
||||||
FaceEnrollAccessibilitySwitch:messageText="@string/security_settings_face_enroll_introduction_accessibility_diversity"/>
|
FaceEnrollAccessibilitySwitch:messageText="@string/security_settings_face_enroll_introduction_accessibility_diversity"/>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
@@ -101,7 +102,7 @@
|
|||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:paddingEnd="16dp"
|
android:paddingEnd="16dp"
|
||||||
android:layout_marginTop="24dp">
|
android:paddingTop="24dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@@ -890,6 +890,8 @@
|
|||||||
<string name="security_settings_face_preference_title">Face authentication</string>
|
<string name="security_settings_face_preference_title">Face authentication</string>
|
||||||
<!-- Button shown which shows accessibility toggles for face enrollment when clicked. [CHAR LIMIT=32] -->
|
<!-- 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>
|
<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] -->
|
<!-- 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>
|
<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] -->
|
<!-- Message shown for a toggle which when enabled, allows the user to enroll using a simpler flow for accessibility [CHAR LIMIT=NONE] -->
|
||||||
|
@@ -72,12 +72,10 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
|
|||||||
|
|
||||||
mFaceManager = Utils.getFaceManagerOrNull(this);
|
mFaceManager = Utils.getFaceManagerOrNull(this);
|
||||||
final Button accessibilityButton = findViewById(R.id.accessibility_button);
|
final Button accessibilityButton = findViewById(R.id.accessibility_button);
|
||||||
final View footerView = findViewById(R.id.footer_layout);
|
|
||||||
accessibilityButton.setOnClickListener(view -> {
|
accessibilityButton.setOnClickListener(view -> {
|
||||||
mSwitchDiversity.setChecked(true);
|
mSwitchDiversity.setChecked(true);
|
||||||
accessibilityButton.setVisibility(View.GONE);
|
accessibilityButton.setVisibility(View.GONE);
|
||||||
mSwitchDiversity.setVisibility(View.VISIBLE);
|
mSwitchDiversity.setVisibility(View.VISIBLE);
|
||||||
footerView.setVisibility(View.GONE);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
mSwitchDiversity = findViewById(R.id.toggle_diversity);
|
mSwitchDiversity = findViewById(R.id.toggle_diversity);
|
||||||
|
Reference in New Issue
Block a user