Update fingerprint enroll UI to spec.
Also adds sliding animations between the steps. Bug: 20495507 Change-Id: I148d8d8b8082361149f02fd2dc4cead0ba3e2526
This commit is contained in:
@@ -1,133 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2015 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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<!-- Upper title area -->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="0.25"
|
||||
android:background="@color/fingerprint_title_area_bg">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fingerprint_enroll_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dip"
|
||||
android:layout_marginStart="40dip"
|
||||
android:layout_marginEnd="40dip"
|
||||
style="@style/TextAppearance.FingerprintTitle"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Lower message area -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="0.75"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fingerprint_enroll_message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dip"
|
||||
android:layout_marginStart="40dip"
|
||||
android:layout_marginEnd="40dip"
|
||||
android:layout_marginBottom="36dip"
|
||||
style="@style/TextAppearance.FingerprintMessage"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/fingerprint_view_selector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center">
|
||||
|
||||
<!-- Only one of the following views will show for any given mode -->
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fingerprint_animator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/fingerprint_indicator" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/fingerprint_progress_bar"
|
||||
android:layout_width="200dip"
|
||||
android:layout_height="200dip"
|
||||
android:layout_centerInParent="true"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:max="10000"
|
||||
android:progress="0"
|
||||
android:indeterminate="false"
|
||||
android:progressDrawable="@drawable/fingerprint_progress_ring" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fingerprint_sensor_location"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/fingerprint_sensor_location" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fingerprint_in_app_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/fingerprint_in_app_indicator" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Button area -->
|
||||
<LinearLayout
|
||||
android:id="@+id/fingerprint_enroll_button_area"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<Button
|
||||
android:id="@+id/fingerprint_enroll_button_add"
|
||||
style="@style/SecurityPreferenceButton"
|
||||
android:text="@string/fingerprint_enroll_button_add"
|
||||
android:layout_margin="10dip" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/fingerprint_enroll_button_next"
|
||||
style="@style/SecurityPreferenceButton"
|
||||
android:text="@string/fingerprint_enroll_button_next"
|
||||
android:layout_margin="10dip" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
73
res/layout/fingerprint_enroll_enrolling_base.xml
Normal file
73
res/layout/fingerprint_enroll_enrolling_base.xml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 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
|
||||
-->
|
||||
|
||||
<com.android.setupwizardlib.SetupWizardLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/SetupWizardFingerprintStyle">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/SuwContentFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false">
|
||||
|
||||
<!-- Make both texts included for layout, so the lower part doesn't jump around when we
|
||||
switch the text -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/suw_description_margin_top">
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.FingerprintMessage"
|
||||
android:id="@+id/start_message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/security_settings_fingerprint_enroll_start_message"/>
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.FingerprintMessage"
|
||||
android:id="@+id/repeat_message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/security_settings_fingerprint_enroll_repeat_message"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<include layout="@layout/fingerprint_enroll_enrolling_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="36dp"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.FingerprintErrorText"
|
||||
android:id="@+id/error_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.android.setupwizardlib.SetupWizardLayout>
|
43
res/layout/fingerprint_enroll_enrolling_content.xml
Normal file
43
res/layout/fingerprint_enroll_enrolling_content.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 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:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="36dp"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fingerprint_animator"
|
||||
android:layout_width="88dp"
|
||||
android:layout_height="88dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/fingerprint_indicator" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/fingerprint_progress_bar"
|
||||
android:layout_width="192dp"
|
||||
android:layout_height="192dp"
|
||||
android:layout_centerInParent="true"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:max="10000"
|
||||
android:progress="0"
|
||||
android:indeterminate="false"
|
||||
android:progressDrawable="@drawable/fingerprint_progress_ring" />
|
||||
|
||||
</RelativeLayout>
|
68
res/layout/fingerprint_enroll_find_sensor_base.xml
Normal file
68
res/layout/fingerprint_enroll_find_sensor_base.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 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
|
||||
-->
|
||||
|
||||
<com.android.setupwizardlib.SetupWizardLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/SetupWizardFingerprintStyle">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/SuwContentFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false">
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.FingerprintMessage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/suw_description_margin_top"
|
||||
android:text="@string/security_settings_fingerprint_enroll_find_sensor_message"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fingerprint_sensor_location"
|
||||
android:layout_width="204dp"
|
||||
android:layout_height="204dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:contentDescription="@string/security_settings_fingerprint_enroll_find_sensor_content_description"
|
||||
android:src="@drawable/fingerprint_sensor_location"
|
||||
android:scaleType="centerInside"/>
|
||||
|
||||
<View
|
||||
android:layout_height="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<Button
|
||||
style="@style/Button.FingerprintButton"
|
||||
android:id="@+id/next_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginEnd="-12dp"
|
||||
android:layout_gravity="end"
|
||||
android:gravity="end|center_vertical"
|
||||
android:text="@string/fingerprint_enroll_button_next" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.android.setupwizardlib.SetupWizardLayout>
|
81
res/layout/fingerprint_enroll_finish_base.xml
Normal file
81
res/layout/fingerprint_enroll_finish_base.xml
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 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
|
||||
-->
|
||||
|
||||
<com.android.setupwizardlib.SetupWizardLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/SetupWizardFingerprintStyle">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/SuwContentFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false">
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.FingerprintMessage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/suw_description_margin_top"
|
||||
android:text="@string/security_settings_fingerprint_enroll_finish_message"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fingerprint_in_app_indicator"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginTop="56dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/fp_app_indicator" />
|
||||
|
||||
<View
|
||||
android:layout_height="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="-12dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_gravity="end"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
style="@style/Button.FingerprintButton"
|
||||
android:id="@+id/add_another_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/fingerprint_enroll_button_add" />
|
||||
|
||||
<Button
|
||||
style="@style/Button.FingerprintButton"
|
||||
android:id="@+id/next_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end|center_vertical"
|
||||
android:text="@string/security_settings_fingerprint_enroll_done" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.android.setupwizardlib.SetupWizardLayout>
|
108
res/layout/fingerprint_enroll_onboard.xml
Normal file
108
res/layout/fingerprint_enroll_onboard.xml
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2015 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.
|
||||
-->
|
||||
|
||||
<com.android.setupwizardlib.SetupWizardLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/SetupWizardFingerprintStyle">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/SuwContentFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false">
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.FingerprintMessage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/suw_description_margin_top"
|
||||
android:layout_marginBottom="@dimen/suw_description_margin_top"
|
||||
android:text="@string/security_settings_fingerprint_enroll_onboard_message"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="?android:attr/textColorPrimary" />
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.FingerprintMessage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/security_settings_fingerprint_enroll_onboard_message_1"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="?android:attr/textColorPrimary" />
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.FingerprintMessage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/security_settings_fingerprint_enroll_onboard_message_2"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_height="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<Button
|
||||
style="@style/Button.FingerprintButton"
|
||||
android:id="@+id/next_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginEnd="-12dp"
|
||||
android:layout_gravity="end"
|
||||
android:gravity="end|center_vertical"
|
||||
android:text="@string/security_settings_fingerprint_enroll_setup_screen_lock"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.android.setupwizardlib.SetupWizardLayout>
|
Reference in New Issue
Block a user