Browse Source

Fingerprint prompt anim done

master
Preyea Regmi 5 years ago
parent
commit
5c17fb86df
  1. 4
      .idea/assetWizardSettings.xml
  2. BIN
      .idea/caches/build_file_checksums.ser
  3. 10
      app/src/main/AndroidManifest.xml
  4. 5
      app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/view/HomeFragmentV2.java
  5. 75
      app/src/main/java/com/gmeremit/online/gmeremittance_native/settings/view/FingerprintEnablePromptActivity.java
  6. 11
      app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/avdfrags/SplashAnimatedViewPagerFragment.java
  7. 1
      app/src/main/java/com/gmeremit/online/gmeremittance_native/utils/https/GenericApiObserverResponseV2.java
  8. 49
      app/src/main/res/drawable/avd_fingerprint_prompt.xml
  9. 38
      app/src/main/res/drawable/vd_fingerprint_prompt.xml
  10. 113
      app/src/main/res/layout/activity_fingerprint_enable_prompt.xml
  11. 8
      app/src/main/res/layout/fragment_penny_test_prompt.xml
  12. 2
      app/src/main/res/layout/fragment_splash_avd_viewpager.xml
  13. 2
      app/src/main/res/values/strings.xml

4
.idea/assetWizardSettings.xml

@ -19,8 +19,8 @@
<option name="values">
<map>
<entry key="assetSourceType" value="FILE" />
<entry key="outputName" value="ic_reward_vd" />
<entry key="sourceFile" value="$USER_HOME$/Desktop/icons/reward folder/ic_reward.svg" />
<entry key="outputName" value="vd_fingerprint_prompt" />
<entry key="sourceFile" value="$USER_HOME$/Desktop/sp.svg" />
</map>
</option>
</PersistentState>

BIN
.idea/caches/build_file_checksums.ser

10
app/src/main/AndroidManifest.xml

@ -25,7 +25,10 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="android:allowBackup">
<activity android:name=".rewardV2.view.rewardorderdetail.RewardOrderDetailActivity"></activity>
<activity android:name=".rewardV2.view.rewardorderdetail.RewardOrderDetailActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name=".resendV2.view.TransactionListingV2Activity"
android:screenOrientation="portrait"
@ -364,6 +367,11 @@
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name=".settings.view.FingerprintEnablePromptActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
</application>
</manifest>

5
app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/view/HomeFragmentV2.java

@ -24,6 +24,7 @@ import com.gmeremit.online.gmeremittance_native.homeV2.presenter.HomeV2Presenter
import com.gmeremit.online.gmeremittance_native.kycV2.view.KYCFormV2Activity;
import com.gmeremit.online.gmeremittance_native.kycV2.view.pennytest.PennyTestActivity;
import com.gmeremit.online.gmeremittance_native.rewardV2.view.rewardlisting.RewardListingV2Activity;
import com.gmeremit.online.gmeremittance_native.settings.view.FingerprintEnablePromptActivity;
import com.gmeremit.online.gmeremittance_native.utils.Utils;
import com.gmeremit.online.gmeremittance_native.utils.https.GenericApiObserverResponse;
@ -243,7 +244,9 @@ public class HomeFragmentV2 extends BaseFragment implements HomeMenuRvAdapterV2.
}
private void showRewardScreen() {
Intent intent=new Intent(getActivity(),RewardListingV2Activity.class);
// Intent intent=new Intent(getActivity(),RewardListingV2Activity.class);
Intent intent=new Intent(getActivity(), FingerprintEnablePromptActivity.class);
startActivity(intent);
}

75
app/src/main/java/com/gmeremit/online/gmeremittance_native/settings/view/FingerprintEnablePromptActivity.java

@ -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);
}
}

11
app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/avdfrags/SplashAnimatedViewPagerFragment.java

@ -1,19 +1,11 @@
package com.gmeremit.online.gmeremittance_native.splash_screen.view.avdfrags;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.AnimatedVectorDrawable;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.DrawableRes;
import android.support.annotation.Nullable;
import android.support.graphics.drawable.Animatable2Compat;
import android.support.graphics.drawable.AnimatedVectorDrawableCompat;
import android.support.graphics.drawable.VectorDrawableCompat;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -38,10 +30,9 @@ public abstract class SplashAnimatedViewPagerFragment extends BaseFragment {
@BindView(R.id.gmeTextView2)
TextView infoText;
@BindView(R.id.avdImage)
@BindView(R.id.avdMobileImage)
ImageView avdImageView;
private AnimatedVectorDrawable fingerPrintAVD;
private AnimatedVectorDrawableCompat fingerPrintAVDCompat;
private boolean isAnimationPlayed = false;

1
app/src/main/java/com/gmeremit/online/gmeremittance_native/utils/https/GenericApiObserverResponseV2.java

@ -47,7 +47,6 @@ public abstract class GenericApiObserverResponseV2<T> extends DisposableObserver
@Override
public void onError(Throwable e) {
e.printStackTrace();
if (e instanceof HttpException) {
if (((HttpException) e).code() == 401)
unauthorizedAccess(HTTPConstants.getErrorMessageFromCode(((HttpException) e).code()));

49
app/src/main/res/drawable/avd_fingerprint_prompt.xml

@ -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>

38
app/src/main/res/drawable/vd_fingerprint_prompt.xml

@ -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>

113
app/src/main/res/layout/activity_fingerprint_enable_prompt.xml

@ -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>

8
app/src/main/res/layout/fragment_penny_test_prompt.xml

@ -6,7 +6,7 @@
android:layout_height="match_parent">
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/textView2"
android:id="@+id/txt_not_use_fingerprint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
@ -28,9 +28,9 @@
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/textView2"
app:layout_constraintEnd_toEndOf="@+id/textView2"
app:layout_constraintStart_toStartOf="@+id/textView2"
app:layout_constraintBottom_toTopOf="@+id/txt_not_use_fingerprint"
app:layout_constraintEnd_toEndOf="@+id/txt_not_use_fingerprint"
app:layout_constraintStart_toStartOf="@+id/txt_not_use_fingerprint"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.32"
app:layout_constraintVertical_chainStyle="packed"

2
app/src/main/res/layout/fragment_splash_avd_viewpager.xml

@ -20,7 +20,7 @@
app:layout_constraintVertical_bias="0.13">
<ImageView
android:id="@+id/avdImage"
android:id="@+id/avdMobileImage"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>

2
app/src/main/res/values/strings.xml

@ -477,6 +477,8 @@
<string name="order_receive_date_text">Order Receive Date</string>
<string name="order_no_text">Order No</string>
<string name="order_type_text">Order Type</string>
<string name="use_fingerprint_text">Use Fingerprint</string>
<string name="biometric_noti_password_use_button_text">Continue only using password</string>
</resources>
Loading…
Cancel
Save