aboutsummaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/.gitignore1
-rw-r--r--library/build.gradle31
-rw-r--r--library/proguard-rules.pro25
-rw-r--r--library/src/androidTest/java/top/trumeet/snippet/aospanimation/library/ExampleInstrumentedTest.java26
-rw-r--r--library/src/main/AndroidManifest.xml1
-rw-r--r--library/src/main/java/top/trumeet/snippet/aospanimation/library/FingerprintAnimationImageView.java79
-rw-r--r--library/src/main/res/anim/enrollment_fingerprint_isolated_animation_interpolator_0.xml19
-rw-r--r--library/src/main/res/anim/enrollment_fingerprint_isolated_animation_interpolator_1.xml19
-rw-r--r--library/src/main/res/anim/enrollment_fingerprint_isolated_animation_interpolator_2.xml19
-rw-r--r--library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_1_path_animation.xml53
-rw-r--r--library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_2_path_animation.xml53
-rw-r--r--library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_5_path_animation.xml53
-rw-r--r--library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_6_path_animation.xml43
-rw-r--r--library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_7_path_animation.xml53
-rw-r--r--library/src/main/res/anim/fast_out_slow_in.xml22
-rw-r--r--library/src/main/res/drawable/enrollment_fingerprint_isolated.xml81
-rw-r--r--library/src/main/res/drawable/enrollment_fingerprint_isolated_animation.xml37
-rw-r--r--library/src/main/res/drawable/fp_illustration_enrollment.xml36
-rw-r--r--library/src/main/res/values-sw400dp/dimens.xml4
-rw-r--r--library/src/main/res/values/colors.xml4
-rw-r--r--library/src/main/res/values/dimens.xml4
-rw-r--r--library/src/test/java/top/trumeet/snippet/aospanimation/library/ExampleUnitTest.java17
22 files changed, 680 insertions, 0 deletions
diff --git a/library/.gitignore b/library/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/library/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/library/build.gradle b/library/build.gradle
new file mode 100644
index 0000000..6d40e21
--- /dev/null
+++ b/library/build.gradle
@@ -0,0 +1,31 @@
+apply plugin: 'com.android.library'
+
+android {
+ compileSdkVersion 26
+ buildToolsVersion "26.0.1"
+
+
+ defaultConfig {
+ minSdkVersion 21
+ targetSdkVersion 26
+ versionCode 1
+ versionName "1.0"
+
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(include: ['*.jar'], dir: 'libs')
+ implementation 'com.android.support:animated-vector-drawable:26.0.0'
+ testImplementation 'junit:junit:4.12'
+ androidTestImplementation 'com.android.support.test:runner:0.5'
+ androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
+}
diff --git a/library/proguard-rules.pro b/library/proguard-rules.pro
new file mode 100644
index 0000000..ab9dfc8
--- /dev/null
+++ b/library/proguard-rules.pro
@@ -0,0 +1,25 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in C:\Users\Trumeet\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/library/src/androidTest/java/top/trumeet/snippet/aospanimation/library/ExampleInstrumentedTest.java b/library/src/androidTest/java/top/trumeet/snippet/aospanimation/library/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..1c0f2e9
--- /dev/null
+++ b/library/src/androidTest/java/top/trumeet/snippet/aospanimation/library/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package top.trumeet.snippet.aospanimation.library;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() throws Exception {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getTargetContext();
+
+ assertEquals("top.trumeet.snippet.aospanimation.library.test", appContext.getPackageName());
+ }
+}
diff --git a/library/src/main/AndroidManifest.xml b/library/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..6b1bc58
--- /dev/null
+++ b/library/src/main/AndroidManifest.xml
@@ -0,0 +1 @@
+<manifest package="top.trumeet.snippet.aospanimation.library" />
diff --git a/library/src/main/java/top/trumeet/snippet/aospanimation/library/FingerprintAnimationImageView.java b/library/src/main/java/top/trumeet/snippet/aospanimation/library/FingerprintAnimationImageView.java
new file mode 100644
index 0000000..0417e5a
--- /dev/null
+++ b/library/src/main/java/top/trumeet/snippet/aospanimation/library/FingerprintAnimationImageView.java
@@ -0,0 +1,79 @@
+package top.trumeet.snippet.aospanimation.library;
+
+import android.content.Context;
+import android.content.res.ColorStateList;
+import android.graphics.drawable.Drawable;
+import android.support.graphics.drawable.Animatable2Compat;
+import android.support.graphics.drawable.AnimatedVectorDrawableCompat;
+import android.support.v4.graphics.drawable.DrawableCompat;
+import android.util.AttributeSet;
+import android.widget.ImageView;
+
+/**
+ * Created by Trumeet on 2017/8/2.
+ * @see <a href="https://github.com/android/platform_packages_apps_settings/blob/master/src/com/android/settings/fingerprint/FingerprintEnrollEnrolling.java" />
+ */
+
+public class FingerprintAnimationImageView extends ImageView {
+ private AnimatedVectorDrawableCompat mIconAnimationDrawable;
+ private boolean mAnimationCancelled;
+
+ public FingerprintAnimationImageView(Context context) {
+ super(context);
+ init();
+ }
+
+ public FingerprintAnimationImageView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init();
+ }
+
+ public FingerprintAnimationImageView(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ init();
+ }
+
+ private void init () {
+ Drawable background = getResources().getDrawable(R.drawable.fp_illustration_enrollment);
+ DrawableCompat.setTintList(background, ColorStateList.valueOf(getResources().getColor(R.color.fingerprint_indicator_background_resting)));
+ setBackgroundDrawable(background);
+ mIconAnimationDrawable = AnimatedVectorDrawableCompat.create(getContext(),
+ R.drawable.enrollment_fingerprint_isolated_animation);
+ setImageDrawable(mIconAnimationDrawable);
+ mIconAnimationDrawable.registerAnimationCallback(mIconAnimationCallback);
+ }
+
+ private final Animatable2Compat.AnimationCallback mIconAnimationCallback =
+ new Animatable2Compat.AnimationCallback() {
+ @Override
+ public void onAnimationEnd(Drawable d) {
+ if (mAnimationCancelled) {
+ return;
+ }
+
+ // Start animation after it has ended.
+ post(new Runnable() {
+ @Override
+ public void run() {
+ startIconAnimation();
+ }
+ });
+ }
+ };
+
+ /**
+ * Start animation
+ */
+ public void startIconAnimation() {
+ mAnimationCancelled = false;
+ mIconAnimationDrawable.start();
+ }
+
+ /**
+ * Stop animation, do not forgot it in onStop
+ */
+ public void stopIconAnimation() {
+ mAnimationCancelled = true;
+ mIconAnimationDrawable.stop();
+ }
+}
diff --git a/library/src/main/res/anim/enrollment_fingerprint_isolated_animation_interpolator_0.xml b/library/src/main/res/anim/enrollment_fingerprint_isolated_animation_interpolator_0.xml
new file mode 100644
index 0000000..b002f7f
--- /dev/null
+++ b/library/src/main/res/anim/enrollment_fingerprint_isolated_animation_interpolator_0.xml
@@ -0,0 +1,19 @@
+<?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
+ -->
+<pathInterpolator
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:pathData="M 0.0,0.0 c 0.4,0.0 0.5,1.0 1.0,1.0" /> \ No newline at end of file
diff --git a/library/src/main/res/anim/enrollment_fingerprint_isolated_animation_interpolator_1.xml b/library/src/main/res/anim/enrollment_fingerprint_isolated_animation_interpolator_1.xml
new file mode 100644
index 0000000..e979f83
--- /dev/null
+++ b/library/src/main/res/anim/enrollment_fingerprint_isolated_animation_interpolator_1.xml
@@ -0,0 +1,19 @@
+<?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
+ -->
+<pathInterpolator
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:pathData="M 0.0,0.0 c 0.8,0.0 0.5,1.0 1.0,1.0" /> \ No newline at end of file
diff --git a/library/src/main/res/anim/enrollment_fingerprint_isolated_animation_interpolator_2.xml b/library/src/main/res/anim/enrollment_fingerprint_isolated_animation_interpolator_2.xml
new file mode 100644
index 0000000..5685270
--- /dev/null
+++ b/library/src/main/res/anim/enrollment_fingerprint_isolated_animation_interpolator_2.xml
@@ -0,0 +1,19 @@
+<?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
+ -->
+<pathInterpolator
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:pathData="M 0.0,0.0 c 0.4,0.0 0.6,1.0 1.0,1.0" /> \ No newline at end of file
diff --git a/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_1_path_animation.xml b/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_1_path_animation.xml
new file mode 100644
index 0000000..34cfa90
--- /dev/null
+++ b/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_1_path_animation.xml
@@ -0,0 +1,53 @@
+<?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
+ -->
+<set
+ xmlns:android="http://schemas.android.com/apk/res/android" >
+ <set
+ android:ordering="sequentially" >
+ <objectAnimator
+ android:duration="233"
+ android:propertyName="trimPathEnd"
+ android:valueFrom="0.0"
+ android:valueTo="0.0"
+ android:valueType="floatType"
+ android:interpolator="@android:interpolator/linear" />
+ <objectAnimator
+ android:duration="566"
+ android:propertyName="trimPathEnd"
+ android:valueFrom="0.0"
+ android:valueTo="1.0"
+ android:valueType="floatType"
+ android:interpolator="@anim/fast_out_slow_in" />
+ </set>
+ <set
+ android:ordering="sequentially" >
+ <objectAnimator
+ android:duration="700"
+ android:propertyName="trimPathStart"
+ android:valueFrom="0.0"
+ android:valueTo="0.0"
+ android:valueType="floatType"
+ android:interpolator="@android:interpolator/linear" />
+ <objectAnimator
+ android:duration="433"
+ android:propertyName="trimPathStart"
+ android:valueFrom="0.0"
+ android:valueTo="1.0"
+ android:valueType="floatType"
+ android:interpolator="@anim/enrollment_fingerprint_isolated_animation_interpolator_1" />
+ </set>
+</set>
diff --git a/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_2_path_animation.xml b/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_2_path_animation.xml
new file mode 100644
index 0000000..349123c
--- /dev/null
+++ b/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_2_path_animation.xml
@@ -0,0 +1,53 @@
+<?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
+ -->
+<set
+ xmlns:android="http://schemas.android.com/apk/res/android" >
+ <set
+ android:ordering="sequentially" >
+ <objectAnimator
+ android:duration="733"
+ android:propertyName="trimPathEnd"
+ android:valueFrom="1.0"
+ android:valueTo="1.0"
+ android:valueType="floatType"
+ android:interpolator="@android:interpolator/linear" />
+ <objectAnimator
+ android:duration="533"
+ android:propertyName="trimPathEnd"
+ android:valueFrom="1.0"
+ android:valueTo="0.0"
+ android:valueType="floatType"
+ android:interpolator="@anim/enrollment_fingerprint_isolated_animation_interpolator_2" />
+ </set>
+ <set
+ android:ordering="sequentially" >
+ <objectAnimator
+ android:duration="366"
+ android:propertyName="trimPathStart"
+ android:valueFrom="1.0"
+ android:valueTo="1.0"
+ android:valueType="floatType"
+ android:interpolator="@android:interpolator/linear" />
+ <objectAnimator
+ android:duration="633"
+ android:propertyName="trimPathStart"
+ android:valueFrom="1.0"
+ android:valueTo="0.0"
+ android:valueType="floatType"
+ android:interpolator="@anim/enrollment_fingerprint_isolated_animation_interpolator_2" />
+ </set>
+</set>
diff --git a/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_5_path_animation.xml b/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_5_path_animation.xml
new file mode 100644
index 0000000..ee07479
--- /dev/null
+++ b/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_5_path_animation.xml
@@ -0,0 +1,53 @@
+<?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
+ -->
+<set
+ xmlns:android="http://schemas.android.com/apk/res/android" >
+ <set
+ android:ordering="sequentially" >
+ <objectAnimator
+ android:duration="166"
+ android:propertyName="trimPathEnd"
+ android:valueFrom="0.0"
+ android:valueTo="0.0"
+ android:valueType="floatType"
+ android:interpolator="@android:interpolator/linear" />
+ <objectAnimator
+ android:duration="900"
+ android:propertyName="trimPathEnd"
+ android:valueFrom="0.0"
+ android:valueTo="1.0"
+ android:valueType="floatType"
+ android:interpolator="@anim/fast_out_slow_in" />
+ </set>
+ <set
+ android:ordering="sequentially" >
+ <objectAnimator
+ android:duration="600"
+ android:propertyName="trimPathStart"
+ android:valueFrom="0.0"
+ android:valueTo="0.0"
+ android:valueType="floatType"
+ android:interpolator="@android:interpolator/linear" />
+ <objectAnimator
+ android:duration="833"
+ android:propertyName="trimPathStart"
+ android:valueFrom="0.0"
+ android:valueTo="1.0"
+ android:valueType="floatType"
+ android:interpolator="@anim/enrollment_fingerprint_isolated_animation_interpolator_1" />
+ </set>
+</set>
diff --git a/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_6_path_animation.xml b/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_6_path_animation.xml
new file mode 100644
index 0000000..498f81c
--- /dev/null
+++ b/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_6_path_animation.xml
@@ -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
+ -->
+<set
+ xmlns:android="http://schemas.android.com/apk/res/android" >
+ <set
+ android:ordering="sequentially" >
+ <objectAnimator
+ android:duration="400"
+ android:propertyName="trimPathEnd"
+ android:valueFrom="1.0"
+ android:valueTo="1.0"
+ android:valueType="floatType"
+ android:interpolator="@android:interpolator/linear" />
+ <objectAnimator
+ android:duration="900"
+ android:propertyName="trimPathEnd"
+ android:valueFrom="1.0"
+ android:valueTo="0.0"
+ android:valueType="floatType"
+ android:interpolator="@anim/enrollment_fingerprint_isolated_animation_interpolator_0" />
+ </set>
+ <objectAnimator
+ android:duration="866"
+ android:propertyName="trimPathStart"
+ android:valueFrom="1.0"
+ android:valueTo="0.0"
+ android:valueType="floatType"
+ android:interpolator="@anim/enrollment_fingerprint_isolated_animation_interpolator_2" />
+</set>
diff --git a/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_7_path_animation.xml b/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_7_path_animation.xml
new file mode 100644
index 0000000..ff30d21
--- /dev/null
+++ b/library/src/main/res/anim/enrollment_fingerprint_isolated_ridge_7_path_animation.xml
@@ -0,0 +1,53 @@
+<?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
+ -->
+<set
+ xmlns:android="http://schemas.android.com/apk/res/android" >
+ <set
+ android:ordering="sequentially" >
+ <objectAnimator
+ android:duration="100"
+ android:propertyName="trimPathEnd"
+ android:valueFrom="0.0"
+ android:valueTo="0.0"
+ android:valueType="floatType"
+ android:interpolator="@android:interpolator/linear" />
+ <objectAnimator
+ android:duration="966"
+ android:propertyName="trimPathEnd"
+ android:valueFrom="0.0"
+ android:valueTo="1.0"
+ android:valueType="floatType"
+ android:interpolator="@anim/fast_out_slow_in" />
+ </set>
+ <set
+ android:ordering="sequentially" >
+ <objectAnimator
+ android:duration="533"
+ android:propertyName="trimPathStart"
+ android:valueFrom="0.0"
+ android:valueTo="0.0"
+ android:valueType="floatType"
+ android:interpolator="@android:interpolator/linear" />
+ <objectAnimator
+ android:duration="900"
+ android:propertyName="trimPathStart"
+ android:valueFrom="0.0"
+ android:valueTo="1.0"
+ android:valueType="floatType"
+ android:interpolator="@anim/enrollment_fingerprint_isolated_animation_interpolator_1" />
+ </set>
+</set>
diff --git a/library/src/main/res/anim/fast_out_slow_in.xml b/library/src/main/res/anim/fast_out_slow_in.xml
new file mode 100644
index 0000000..d43873c
--- /dev/null
+++ b/library/src/main/res/anim/fast_out_slow_in.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2014 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
+ -->
+
+<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
+ android:controlX1="0.4"
+ android:controlY1="0"
+ android:controlX2="0.2"
+ android:controlY2="1"/> \ No newline at end of file
diff --git a/library/src/main/res/drawable/enrollment_fingerprint_isolated.xml b/library/src/main/res/drawable/enrollment_fingerprint_isolated.xml
new file mode 100644
index 0000000..fc31ff8
--- /dev/null
+++ b/library/src/main/res/drawable/enrollment_fingerprint_isolated.xml
@@ -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
+ -->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:name="enrollment_fingerprint_isolated"
+ android:width="75dp"
+ android:viewportWidth="75"
+ android:height="88dp"
+ android:viewportHeight="88" >
+ <group
+ android:name="fingerprint_ridges_2"
+ android:translateX="37.5835"
+ android:translateY="43.66685" >
+ <group
+ android:name="ridge_5" >
+ <path
+ android:name="ridge_5_path"
+ android:pathData="M 24.9488677979,32.3508300781 c -1.81059265137,0.338500976562 -3.58520507812,0.447387695312 -4.62879943848,0.447387695312 c -4.12730407715,0.0 -8.05894470215,-0.96842956543 -11.5207061768,-3.45275878906 c -5.33699035645,-3.830078125 -8.56369018555,-10.0885009766 -8.56369018555,-17.1589355469"
+ android:strokeColor="#19000000"
+ android:strokeWidth="5"
+ android:strokeLineCap="round"
+ android:trimPathEnd="0" />
+ </group>
+ <group
+ android:name="ridge_4" >
+ <path
+ android:name="ridge_7_path"
+ android:pathData="M -9.23379516602,40.8356933594 c -3.24549865723,-3.46032714844 -5.1540222168,-5.77195739746 -7.87710571289,-10.9068603516 c -2.76379394531,-5.21166992188 -4.04838562012,-11.3482666016 -4.04838562012,-17.6915283203 c 0.0,-11.6563720703 9.44940185547,-21.1059570312 21.1058959961,-21.1059570312 c 11.6564941406,0.0 21.1058959961,9.44958496094 21.1058959961,21.1059570312"
+ android:strokeColor="#19000000"
+ android:strokeWidth="5"
+ android:strokeLineCap="round"
+ android:trimPathEnd="0" />
+ </group>
+ <group
+ android:name="ridge_3" >
+ <path
+ android:name="ridge_6_path"
+ android:pathData="M -28.8249053955,28.5169677734 c -2.41259765625,-6.82202148438 -2.85319519043,-12.3121337891 -2.85319519043,-16.3226318359 c 0.0,-4.64868164062 0.792999267578,-9.06323242188 2.59269714355,-13.0396728516 c 4.96929931641,-10.9801025391 16.0211029053,-18.619140625 28.857208252,-18.619140625 c 17.4846954346,0.0 31.6587982178,14.1740722656 31.6587982178,31.6588134766 c 0.0,5.82824707031 -4.72470092773,10.5529785156 -10.5529022217,10.5529785156 c -5.82820129395,0.0 -10.5529937744,-4.72473144531 -10.5529937744,-10.5529785156 c 0.0,-5.82824707031 -4.72470092773,-10.5529785156 -10.5529022217,-10.5529785156 c -5.82820129395,0.0 -10.5529022217,4.72473144531 -10.5529022217,10.5529785156 c 0.0,8.17932128906 3.10879516602,15.5925292969 8.25030517578,21.0004882812 c 3.88919067383,4.09069824219 7.77758789062,6.64123535156 14.2838897705,8.52136230469"
+ android:strokeColor="#19000000"
+ android:strokeWidth="5"
+ android:strokeLineCap="round"
+ android:trimPathStart="1" />
+ </group>
+ <group
+ android:name="ridge_2" >
+ <path
+ android:name="ridge_2_path"
+ android:pathData="M -34.4861907959,-11.6943359375 c 3.78790283203,-5.64636230469 8.36389160156,-9.94665527344 14.3594970703,-13.2164306641 c 5.99560546875,-3.26977539062 12.8716125488,-5.1279296875 20.1817016602,-5.1279296875 c 7.27980041504,0.0 14.129196167,1.84289550781 20.1071014404,5.08740234375 c 5.97790527344,3.24450683594 10.7957000732,7.759765625 14.5897064209,13.3666992188"
+ android:strokeColor="#19000000"
+ android:strokeWidth="5"
+ android:strokeLineCap="round"
+ android:trimPathStart="1" />
+ </group>
+ <group
+ android:name="ridge_1"
+ android:translateX="-97.5"
+ android:translateY="-142.5" >
+ <path
+ android:name="ridge_1_path"
+ android:pathData="M 121.472564697,107.859741211 c -7.39790344238,-4.03979492188 -15.2462921143,-6.34167480469 -24.3116912842,-6.34167480469 c -9.06539916992,0.0 -16.2951049805,2.40405273438 -23.12550354,6.34167480469"
+ android:strokeColor="#19000000"
+ android:strokeWidth="5"
+ android:strokeLineCap="round"
+ android:trimPathEnd="0" />
+ </group>
+ </group>
+</vector>
diff --git a/library/src/main/res/drawable/enrollment_fingerprint_isolated_animation.xml b/library/src/main/res/drawable/enrollment_fingerprint_isolated_animation.xml
new file mode 100644
index 0000000..4780eb5
--- /dev/null
+++ b/library/src/main/res/drawable/enrollment_fingerprint_isolated_animation.xml
@@ -0,0 +1,37 @@
+<?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
+ -->
+<animated-vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:drawable="@drawable/enrollment_fingerprint_isolated"
+ tools:ignore="NewApi">
+ <target
+ android:name="ridge_5_path"
+ android:animation="@anim/enrollment_fingerprint_isolated_ridge_5_path_animation" />
+ <target
+ android:name="ridge_7_path"
+ android:animation="@anim/enrollment_fingerprint_isolated_ridge_7_path_animation" />
+ <target
+ android:name="ridge_6_path"
+ android:animation="@anim/enrollment_fingerprint_isolated_ridge_6_path_animation" />
+ <target
+ android:name="ridge_2_path"
+ android:animation="@anim/enrollment_fingerprint_isolated_ridge_2_path_animation" />
+ <target
+ android:name="ridge_1_path"
+ android:animation="@anim/enrollment_fingerprint_isolated_ridge_1_path_animation" />
+</animated-vector>
diff --git a/library/src/main/res/drawable/fp_illustration_enrollment.xml b/library/src/main/res/drawable/fp_illustration_enrollment.xml
new file mode 100644
index 0000000..f9b7ed4
--- /dev/null
+++ b/library/src/main/res/drawable/fp_illustration_enrollment.xml
@@ -0,0 +1,36 @@
+<!--
+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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="88.0dp"
+ android:height="88.0dp"
+ android:viewportWidth="88.0"
+ android:viewportHeight="88.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M67.74,11.59c-0.41,0.0 -0.82,-0.1 -1.2,-0.31c-7.44,-4.06 -15.0,-6.04 -23.11,-6.04c-7.92,0.0 -14.67,1.85 -21.88,6.01c-1.2,0.69 -2.73,0.28 -3.42,-0.92s-0.28,-2.72 0.92,-3.41c7.9,-4.55 15.65,-6.68 24.37,-6.68c8.97,0.0 17.32,2.17 25.51,6.65c1.21,0.66 1.66,2.18 1.0,3.39C69.48,11.12 68.62,11.59 67.74,11.59z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M9.25,34.74c-0.48,0.0 -0.96,-0.14 -1.39,-0.42c-1.15,-0.77 -1.45,-2.32 -0.68,-3.47c4.09,-6.09 9.3,-10.89 15.49,-14.27c6.52,-3.55 13.91,-5.43 21.38,-5.43c7.44,0.0 14.8,1.86 21.3,5.39c6.17,3.35 11.38,8.12 15.47,14.16c0.77,1.14 0.47,2.7 -0.67,3.47c-1.14,0.77 -2.7,0.47 -3.47,-0.67c-3.64,-5.38 -8.25,-9.61 -13.71,-12.57c-5.77,-3.13 -12.31,-4.78 -18.92,-4.78c-6.63,0.0 -13.2,1.67 -18.98,4.82c-5.48,2.99 -10.1,7.25 -13.73,12.66C10.85,34.35 10.06,34.74 9.25,34.74z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M34.76,86.82c-0.67,0.0 -1.33,-0.27 -1.82,-0.79c-3.49,-3.72 -5.51,-6.25 -8.26,-11.45c-2.84,-5.35 -4.34,-11.88 -4.34,-18.86c0.0,-13.02 10.59,-23.61 23.61,-23.61c13.02,0.0 23.61,10.59 23.61,23.61c0.0,1.38 -1.12,2.5 -2.5,2.5s-2.5,-1.12 -2.5,-2.5c0.0,-10.26 -8.35,-18.61 -18.61,-18.61c-10.26,0.0 -18.61,8.35 -18.61,18.61c0.0,6.17 1.3,11.89 3.76,16.52c2.62,4.94 4.37,7.04 7.49,10.37c0.94,1.01 0.89,2.59 -0.11,3.53C35.99,86.6 35.38,86.82 34.76,86.82z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M64.28,78.84c-4.99,0.0 -9.35,-1.32 -12.98,-3.92c-6.17,-4.43 -9.86,-11.6 -9.86,-19.19c0.0,-1.38 1.12,-2.5 2.5,-2.5s2.5,1.12 2.5,2.5c0.0,5.98 2.91,11.64 7.77,15.13c2.8,2.01 6.09,2.98 10.06,2.98c0.97,0.0 2.57,-0.11 4.17,-0.4c1.36,-0.25 2.66,0.64 2.92,2.0c0.25,1.36 -0.64,2.66 -2.0,2.92C66.93,78.8 64.86,78.84 64.28,78.84z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M55.92,87.75c-0.23,0.0 -0.46,-0.03 -0.7,-0.1c-6.6,-1.91 -10.92,-4.49 -15.4,-9.2c-5.76,-6.06 -8.94,-14.13 -8.94,-22.72c0.0,-7.2 5.86,-13.05 13.05,-13.05c7.2,0.0 13.05,5.86 13.05,13.05c0.0,4.44 3.61,8.05 8.05,8.05s8.05,-3.61 8.05,-8.05c0.0,-16.08 -13.08,-29.16 -29.16,-29.16c-11.43,0.0 -21.86,6.73 -26.58,17.15c-1.57,3.48 -2.37,7.52 -2.37,12.01c0.0,3.36 0.28,8.62 2.71,15.49c0.46,1.3 -0.22,2.73 -1.52,3.19c-1.3,0.46 -2.73,-0.22 -3.19,-1.52c-2.02,-5.7 -3.0,-11.31 -3.0,-17.16c0.0,-5.21 0.95,-9.94 2.82,-14.07c5.52,-12.2 17.74,-20.09 31.13,-20.09c18.83,0.0 34.16,15.32 34.16,34.16c0.0,7.2 -5.86,13.05 -13.05,13.05S52.0,62.92 52.0,55.73c0.0,-4.44 -3.61,-8.05 -8.05,-8.05s-8.05,3.61 -8.05,8.05c0.0,7.3 2.69,14.15 7.56,19.28c3.86,4.06 7.43,6.18 13.17,7.84c1.33,0.38 2.09,1.77 1.71,3.1C58.01,87.04 57.01,87.75 55.92,87.75z"/>
+</vector>
diff --git a/library/src/main/res/values-sw400dp/dimens.xml b/library/src/main/res/values-sw400dp/dimens.xml
new file mode 100644
index 0000000..f77d4fb
--- /dev/null
+++ b/library/src/main/res/values-sw400dp/dimens.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <dimen name="fingerprint_animation_size">100dp</dimen>
+</resources> \ No newline at end of file
diff --git a/library/src/main/res/values/colors.xml b/library/src/main/res/values/colors.xml
new file mode 100644
index 0000000..f335e5e
--- /dev/null
+++ b/library/src/main/res/values/colors.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="fingerprint_indicator_background_resting">#12000000</color>
+</resources> \ No newline at end of file
diff --git a/library/src/main/res/values/dimens.xml b/library/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..7a84eac
--- /dev/null
+++ b/library/src/main/res/values/dimens.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <dimen name="fingerprint_animation_size">88dp</dimen>
+</resources> \ No newline at end of file
diff --git a/library/src/test/java/top/trumeet/snippet/aospanimation/library/ExampleUnitTest.java b/library/src/test/java/top/trumeet/snippet/aospanimation/library/ExampleUnitTest.java
new file mode 100644
index 0000000..ea28f9c
--- /dev/null
+++ b/library/src/test/java/top/trumeet/snippet/aospanimation/library/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package top.trumeet.snippet.aospanimation.library;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() throws Exception {
+ assertEquals(4, 2 + 2);
+ }
+} \ No newline at end of file