Merge "Add skip button to fingerprint enrolling screen" into oc-dr1-dev am: 624212f43c
am: a3eb263479
Change-Id: Ibe7045461c17aaf3b761f746bac2a596b9e7e2a0
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
style="@style/SuwGlifIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="?attr/suwGlifHeaderGravity"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:src="@drawable/ic_fingerprint_header" />
|
||||
@@ -82,6 +83,18 @@
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/skip_button"
|
||||
style="@style/SuwGlifButton.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/skip_label" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
|
@@ -17,10 +17,12 @@
|
||||
|
||||
<com.android.setupwizardlib.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="?attr/fingerprint_layout_theme">
|
||||
style="?attr/fingerprint_layout_theme"
|
||||
app:suwFooter="@layout/fingerprint_enroll_enrolling_base_footer">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/SuwContentFrame"
|
||||
@@ -58,8 +60,7 @@
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingBottom="80dp">
|
||||
android:layout_weight="1">
|
||||
|
||||
<include layout="@layout/fingerprint_enroll_enrolling_content"
|
||||
android:layout_width="@dimen/fingerprint_progress_bar_max_size"
|
||||
|
31
res/layout/fingerprint_enroll_enrolling_base_footer.xml
Normal file
31
res/layout/fingerprint_enroll_enrolling_base_footer.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2017 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.
|
||||
-->
|
||||
|
||||
<!-- TODO: Use aapt:attr when it is fixed (b/36809755) -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/SuwGlifButtonBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<Button
|
||||
style="@style/SuwGlifButton.Secondary"
|
||||
android:id="@+id/skip_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/skip_label" />
|
||||
|
||||
</LinearLayout>
|
@@ -36,6 +36,7 @@ import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.view.animation.Interpolator;
|
||||
import android.widget.Button;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -98,6 +99,10 @@ public class FingerprintEnrollEnrolling extends FingerprintEnrollBase
|
||||
mRepeatMessage = (TextView) findViewById(R.id.repeat_message);
|
||||
mErrorText = (TextView) findViewById(R.id.error_text);
|
||||
mProgressBar = (ProgressBar) findViewById(R.id.fingerprint_progress_bar);
|
||||
|
||||
Button skipButton = findViewById(R.id.skip_button);
|
||||
skipButton.setOnClickListener(this);
|
||||
|
||||
final LayerDrawable fingerprintDrawable = (LayerDrawable) mProgressBar.getBackground();
|
||||
mIconAnimationDrawable = (AnimatedVectorDrawable)
|
||||
fingerprintDrawable.findDrawableByLayerId(R.id.fingerprint_animation);
|
||||
@@ -211,6 +216,18 @@ public class FingerprintEnrollEnrolling extends FingerprintEnrollBase
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.skip_button:
|
||||
setResult(RESULT_SKIP);
|
||||
finish();
|
||||
break;
|
||||
default:
|
||||
super.onClick(v);
|
||||
}
|
||||
}
|
||||
|
||||
private void animateProgress(int progress) {
|
||||
if (mProgressAnim != null) {
|
||||
mProgressAnim.cancel();
|
||||
|
Reference in New Issue
Block a user