Preyea Regmi
5 years ago
13 changed files with 298 additions and 20 deletions
-
4.idea/assetWizardSettings.xml
-
BIN.idea/caches/build_file_checksums.ser
-
10app/src/main/AndroidManifest.xml
-
5app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/view/HomeFragmentV2.java
-
75app/src/main/java/com/gmeremit/online/gmeremittance_native/settings/view/FingerprintEnablePromptActivity.java
-
11app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/avdfrags/SplashAnimatedViewPagerFragment.java
-
1app/src/main/java/com/gmeremit/online/gmeremittance_native/utils/https/GenericApiObserverResponseV2.java
-
49app/src/main/res/drawable/avd_fingerprint_prompt.xml
-
38app/src/main/res/drawable/vd_fingerprint_prompt.xml
-
113app/src/main/res/layout/activity_fingerprint_enable_prompt.xml
-
8app/src/main/res/layout/fragment_penny_test_prompt.xml
-
2app/src/main/res/layout/fragment_splash_avd_viewpager.xml
-
2app/src/main/res/values/strings.xml
@ -0,0 +1,75 @@ |
|||
package com.gmeremit.online.gmeremittance_native.settings.view; |
|||
|
|||
import android.os.Handler; |
|||
import android.support.graphics.drawable.AnimatedVectorDrawableCompat; |
|||
import android.support.v7.app.AppCompatActivity; |
|||
import android.os.Bundle; |
|||
import android.widget.ImageView; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.R; |
|||
|
|||
import butterknife.BindView; |
|||
import butterknife.ButterKnife; |
|||
|
|||
public class FingerprintEnablePromptActivity extends AppCompatActivity { |
|||
|
|||
private AnimatedVectorDrawableCompat mobileBg; |
|||
private AnimatedVectorDrawableCompat fingerBg; |
|||
|
|||
@BindView(R.id.avdMobileImage) |
|||
ImageView avdMobileImageView; |
|||
|
|||
@BindView(R.id.avdFingerImage) |
|||
ImageView avdFingerImageView; |
|||
|
|||
private boolean isAnimationPlayed = false; |
|||
|
|||
@Override |
|||
protected void onCreate(Bundle savedInstanceState) { |
|||
super.onCreate(savedInstanceState); |
|||
setContentView(R.layout.activity_fingerprint_enable_prompt); |
|||
ButterKnife.bind(this); |
|||
init(); |
|||
performDefaultAction(savedInstanceState); |
|||
} |
|||
|
|||
private void init() |
|||
{ |
|||
mobileBg = AnimatedVectorDrawableCompat.create(this, R.drawable.avd_fingerprint_prompt); |
|||
fingerBg = AnimatedVectorDrawableCompat.create(this, R.drawable.avd_fingerprint_off_to_on); |
|||
} |
|||
|
|||
void performDefaultAction(Bundle savedInstance) |
|||
{ |
|||
avdMobileImageView.setImageDrawable(mobileBg); |
|||
|
|||
} |
|||
public void playAnimation(long delay) { |
|||
if(delay<0) |
|||
delay=0; |
|||
new Handler().postDelayed(() -> { |
|||
try { |
|||
if (!isAnimationPlayed) { |
|||
if (mobileBg != null && !mobileBg.isRunning()) |
|||
mobileBg.start(); |
|||
if (fingerBg != null && !fingerBg.isRunning()) { |
|||
avdFingerImageView.setImageDrawable(fingerBg); |
|||
fingerBg.start(); |
|||
} |
|||
isAnimationPlayed = true; |
|||
} |
|||
} catch (Exception e) { |
|||
|
|||
throw e; |
|||
|
|||
} |
|||
}, delay); |
|||
|
|||
} |
|||
|
|||
@Override |
|||
protected void onResume() { |
|||
super.onResume(); |
|||
playAnimation(300); |
|||
} |
|||
} |
@ -0,0 +1,49 @@ |
|||
<animated-vector |
|||
xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:aapt="http://schemas.android.com/aapt" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:drawable="@drawable/vd_fingerprint_prompt" |
|||
tools:ignore="NewApi"> |
|||
<!--<target android:name="ridge_5_path">--> |
|||
<!--<aapt:attr name="android:animation">--> |
|||
<!--<set android:ordering="sequentially">--> |
|||
<!--<objectAnimator--> |
|||
<!--android:duration="33"--> |
|||
<!--android:interpolator="@android:interpolator/linear"--> |
|||
<!--android:propertyName="trimPathEnd"--> |
|||
<!--android:valueFrom="0"--> |
|||
<!--android:valueTo="0"--> |
|||
<!--android:valueType="floatType"/>--> |
|||
<!--<objectAnimator--> |
|||
<!--android:duration="383"--> |
|||
<!--android:interpolator="@interpolator/fingerprint_on_0"--> |
|||
<!--android:propertyName="trimPathEnd"--> |
|||
<!--android:valueFrom="0.0"--> |
|||
<!--android:valueTo="1.0"--> |
|||
<!--android:valueType="floatType"/>--> |
|||
<!--</set>--> |
|||
<!--</aapt:attr>--> |
|||
<!--</target>--> |
|||
<target android:name="check"> |
|||
<aapt:attr name="android:animation"> |
|||
<set android:ordering="sequentially"> |
|||
<objectAnimator |
|||
android:duration="33" |
|||
android:interpolator="@android:interpolator/linear" |
|||
android:propertyName="trimPathEnd" |
|||
android:valueFrom="0" |
|||
android:valueTo="0" |
|||
android:valueType="floatType"/> |
|||
<objectAnimator |
|||
android:startOffset="500" |
|||
android:duration="383" |
|||
android:interpolator="@interpolator/fingerprint_on_0" |
|||
android:propertyName="trimPathEnd" |
|||
android:valueFrom="0.0" |
|||
android:valueTo="1.0" |
|||
android:valueType="floatType"/> |
|||
</set> |
|||
</aapt:attr> |
|||
</target> |
|||
|
|||
</animated-vector> |
@ -0,0 +1,38 @@ |
|||
<vector |
|||
xmlns:android="http://schemas.android.com/apk/res/android" |
|||
android:name="vector" |
|||
android:width="5120dp" |
|||
android:height="5120dp" |
|||
android:viewportWidth="5120" |
|||
android:viewportHeight="5120"> |
|||
<path |
|||
android:name="path_3" |
|||
android:pathData="M 752 4148 C 677 4120 596 4037 575 3968 C 562 3922 560 3707 560 2075 C 560 -13 552 177 644 84 C 734 -6 660 0 1752 0 C 2486 0 2721 3 2757 13 C 2816 28 2901 104 2938 174 L 2965 225 L 2968 1368 L 2970 2511 L 2941 2541 C 2901 2580 2859 2580 2819 2541 L 2790 2512 L 2790 1661 L 2790 810 L 1755 810 L 720 810 L 720 2080 L 720 3350 L 1460 3352 C 2191 3355 2200 3355 2220 3376 C 2231 3387 2243 3413 2247 3433 C 2252 3464 2248 3473 2222 3500 L 2192 3530 L 1455 3530 L 718 3530 L 722 3703 C 725 3853 728 3880 746 3914 C 787 3993 755 3990 1462 3990 C 1927 3990 2096 3993 2115 4002 C 2144 4015 2170 4057 2170 4089 C 2170 4100 2158 4122 2144 4139 L 2118 4170 L 1462 4169 C 825 4169 803 4168 752 4148 Z M 2788 446 C 2785 240 2781 227 2709 185 C 2676 165 2657 165 1755 165 L 835 165 L 800 187 C 733 228 726 253 722 453 L 718 630 L 1755 630 L 2791 630 L 2788 446 Z" |
|||
android:fillColor="#000000" |
|||
android:strokeColor="#00000000"/> |
|||
<path |
|||
android:name="path_4" |
|||
android:pathData="M 1563 476 C 1505 450 1491 378 1535 335 C 1559 310 1560 310 1759 310 L 1958 310 L 1984 341 C 2018 381 2017 412 1981 452 L 1952 485 L 1773 487 C 1637 489 1588 487 1563 476 Z" |
|||
android:fillColor="#000000" |
|||
android:strokeColor="#00000000"/> |
|||
<path |
|||
android:name="path_5" |
|||
android:pathData="M 1537 3822 C 1502 3786 1501 3741 1534 3703 L 1558 3675 L 1740 3672 C 1941 3668 1971 3674 1995 3721 C 2017 3763 2013 3788 1981 3821 L 1952 3850 L 1758 3850 L 1564 3850 L 1537 3822 Z" |
|||
android:fillColor="#000000" |
|||
android:strokeColor="#00000000"/> |
|||
|
|||
<group |
|||
android:name="checkcontainer" |
|||
android:rotation="-45" |
|||
android:pivotX="1085" |
|||
android:pivotY="2650" |
|||
android:translateX="330"> |
|||
<path |
|||
android:name="check" |
|||
android:pathData="M 1315 2250 L 1315 2650 L 2400 2650" |
|||
android:strokeAlpha="1" |
|||
android:trimPathEnd="0" |
|||
android:strokeWidth="170" |
|||
android:strokeColor="@color/bluebg"/> |
|||
</group> |
|||
</vector> |
@ -0,0 +1,113 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
tools:context="com.gmeremit.online.gmeremittance_native.settings.view.FingerprintEnablePromptActivity"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/gmeTextView5" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="10dp" |
|||
android:layout_marginEnd="10dp" |
|||
android:layout_marginBottom="64dp" |
|||
android:gravity="center" |
|||
android:text="Do you want to use fingerprint instead of password?" |
|||
android:textColor="@color/colorAccent" |
|||
android:textSize="24sp" |
|||
app:layout_constraintBottom_toTopOf="@+id/avdMobileImage" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:txtfontName="@string/bold" /> |
|||
|
|||
<ImageView |
|||
android:id="@+id/avdMobileImage" |
|||
android:layout_width="118dp" |
|||
android:layout_height="128dp" |
|||
android:layout_marginStart="8dp" |
|||
android:layout_marginTop="32dp" |
|||
android:layout_marginEnd="8dp" |
|||
android:layout_marginBottom="8dp" |
|||
app:layout_constraintBottom_toBottomOf="@+id/txt_not_use_fingerprint" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" |
|||
app:layout_constraintVertical_bias="0.35000002" /> |
|||
|
|||
<ImageView |
|||
android:id="@+id/avdFingerImage" |
|||
android:layout_width="65dp" |
|||
android:layout_height="65dp" |
|||
android:layout_marginStart="32dp" |
|||
app:layout_constraintBottom_toBottomOf="@+id/avdMobileImage" |
|||
app:layout_constraintEnd_toEndOf="@+id/avdMobileImage" |
|||
app:layout_constraintHorizontal_bias="0.68" |
|||
app:layout_constraintStart_toStartOf="@+id/avdMobileImage" |
|||
app:layout_constraintTop_toTopOf="@+id/avdMobileImage" |
|||
app:layout_constraintVertical_bias="1.0" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/textView" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="10dp" |
|||
android:layout_marginTop="32dp" |
|||
android:layout_marginEnd="10dp" |
|||
android:gravity="center" |
|||
android:paddingStart="15dp" |
|||
android:paddingEnd="15dp" |
|||
android:text="You can later change your preference from" |
|||
android:textSize="18sp" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toBottomOf="@+id/avdMobileImage" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/textView4" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="10dp" |
|||
android:layout_marginTop="8dp" |
|||
android:layout_marginEnd="10dp" |
|||
android:gravity="center" |
|||
android:paddingStart="15dp" |
|||
android:paddingEnd="15dp" |
|||
android:text="Setting >> Fingerprint Authentication" |
|||
android:textColor="@color/bluebg" |
|||
android:textSize="15sp" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toBottomOf="@+id/textView" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeButton |
|||
android:id="@+id/btn_use_fingerprint" |
|||
android:layout_width="200dp" |
|||
android:layout_height="50dp" |
|||
android:layout_gravity="center" |
|||
android:layout_marginStart="8dp" |
|||
android:layout_marginEnd="8dp" |
|||
android:layout_marginBottom="28dp" |
|||
android:background="@drawable/red_morph_button_bg" |
|||
android:text="@string/use_fingerprint_text" |
|||
android:textAllCaps="false" |
|||
android:textColor="@color/white" |
|||
android:textSize="18sp" |
|||
app:layout_constraintBottom_toTopOf="@+id/txt_not_use_fingerprint" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/txt_not_use_fingerprint" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="10dp" |
|||
android:layout_marginEnd="10dp" |
|||
android:layout_marginBottom="52dp" |
|||
android:text="@string/biometric_noti_password_use_button_text" |
|||
android:textColor="@color/colorPrimary" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" /> |
|||
</android.support.constraint.ConstraintLayout> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue