diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/SplashScreen.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/SplashScreen.java index 7f6b33c9..e731fb0b 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/SplashScreen.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/SplashScreen.java @@ -19,11 +19,9 @@ import android.support.v4.content.ContextCompat; import android.support.v4.view.ViewCompat; import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPropertyAnimatorListenerAdapter; -import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.StaggeredGridLayoutManager; import android.text.Html; -import android.util.Log; import android.view.Gravity; import android.view.View; import android.view.animation.AccelerateDecelerateInterpolator; @@ -113,7 +111,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, private ArrayList fragmentList; - public final String TAG=getClass().getSimpleName(); + public final String TAG = getClass().getSimpleName(); ViewPager.OnPageChangeListener viewPageChangeListener = new ViewPager.OnPageChangeListener() { @@ -145,6 +143,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, } + private void performDefaultAction(Bundle savedInstanceState) { if (savedInstanceState == null) { languageViewTransitionManager.underlineTitleText(true); @@ -170,22 +169,19 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, // view_pager.setOffscreenPageLimit(3); - } - private void initLanguageRV() - { + private void initLanguageRV() { languageSelectionRVAdapter = new LanguageSelectionRVAdapter(); languageSelectionRVAdapter.setLanguageSelectionListener(this); languageRv.setAdapter(languageSelectionRVAdapter); } - private void initPayoutModeRV() - { - SelectedRedBorderDecoration selectedRedBorderDecoration=new SelectedRedBorderDecoration(this); + private void initPayoutModeRV() { + SelectedRedBorderDecoration selectedRedBorderDecoration = new SelectedRedBorderDecoration(this); paymentModeRV.addItemDecoration(selectedRedBorderDecoration); - paymentModeRV.setLayoutManager(new StaggeredGridLayoutManager(3,StaggeredGridLayoutManager.VERTICAL)); - payoutModeSelectionRVAdapter=new PayoutModeSelectionRVAdapter(this); + paymentModeRV.setLayoutManager(new StaggeredGridLayoutManager(3, StaggeredGridLayoutManager.VERTICAL)); + payoutModeSelectionRVAdapter = new PayoutModeSelectionRVAdapter(this); paymentModeRV.setAdapter(payoutModeSelectionRVAdapter); } @@ -350,19 +346,25 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, private Interpolator accelerateDecelerateInterpolator; private boolean userNavigatedToLanguageView; private int textViewPaintFlags; + private ConstraintSet initialSet; + private boolean notCalculatedInitialConstraint; LanguageViewTransitionManager(Context context) { isAnimationOnProgress = false; this.context = context; constraintSet = new ConstraintSet(); + initialSet=new ConstraintSet(); + initialSet.clone(rootLayout); anticipateOvershootInterpolator = new AnticipateOvershootInterpolator(.8f); overshootInterpolator = new OvershootInterpolator(); accelerateDecelerateInterpolator = new AccelerateDecelerateInterpolator(); textViewPaintFlags = selectedLanguageText.getPaintFlags(); + notCalculatedInitialConstraint = true; } void showLanguageView(Runnable onAnimationCompleteCallback) { + hideKeyBoard(); constraintSet.clone(context, R.layout.activity_splash_screen_key_2); ChangeBounds transition = new ChangeBounds(); transition.setPathMotion(new ArcMotion()); @@ -413,9 +415,6 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, } void hideLanguage(Runnable onAnimationCompleteCallback) { - - constraintSet.clone(context, R.layout.activity_splash_screen_key_1); - ChangeBounds transition = new ChangeBounds(); transition.setPathMotion(new ArcMotion()); transition.setInterpolator(overshootInterpolator); @@ -456,7 +455,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, } }); TransitionManager.beginDelayedTransition(rootLayout, transition); - constraintSet.applyTo(rootLayout); + initialSet.applyTo(rootLayout); } public boolean isAnimationRunning() { @@ -479,7 +478,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, private void initAntiDebugger() { boolean isDebuggable = (0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE)); - if (isDebuggable&&false) + if (isDebuggable && false) startAntiDebugger(); } diff --git a/app/src/main/res/layout/activity_splash_screen_key_1.xml b/app/src/main/res/layout/activity_splash_screen_key_1.xml index 3b25aa5e..0b2dcfd2 100644 --- a/app/src/main/res/layout/activity_splash_screen_key_1.xml +++ b/app/src/main/res/layout/activity_splash_screen_key_1.xml @@ -1,431 +1,430 @@ - + android:fillViewport="true"> - - - - - - - - - - - + android:background="@color/colorPrimary"> + + + + + + app:layout_constraintTop_toTopOf="@+id/view_pager" /> - + app:layout_constraintTop_toBottomOf="@id/selectedLanguageText"> - - - - - + android:gravity="start|left" + android:paddingTop="@dimen/_4sdp" + android:paddingBottom="@dimen/_4sdp" + android:text="@string/todays_rate_text" + android:textColor="@color/dark_gray" + android:textSize="@dimen/_11ssp" + app:layout_constraintBottom_toTopOf="@+id/paymentModeRV" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.13" + app:layout_constraintVertical_chainStyle="packed" + app:txtfontName="@string/semibold" /> + + - + - - + android:layout_weight="1" + android:orientation="vertical" + android:paddingLeft="@dimen/_4sdp" + android:paddingRight="@dimen/_4sdp"> - - + android:layout_height="wrap_content" + android:paddingStart="@dimen/_2sdp" + android:paddingLeft="@dimen/_2sdp" + android:paddingTop="@dimen/_2sdp" + android:text="@string/you_send_text" + android:textColor="@color/darkgray" + android:textSize="@dimen/_12ssp" /> + + - - - - - android:paddingEnd="@dimen/_2sdp" - app:layout_constraintBottom_toTopOf="@+id/circularIndexView2" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/linearLayout" /> + + + + + + + + + + + - + + android:paddingEnd="@dimen/_2sdp" + app:layout_constraintBottom_toTopOf="@+id/circularIndexView2" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/linearLayout" /> - - - + + + + + - - - - - - - + android:background="@drawable/curve_rectangle_grey_bg" + android:orientation="horizontal" + android:padding="@dimen/_1sdp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/circularIndexView2"> - - + android:layout_weight="1" + android:orientation="vertical" + android:paddingLeft="@dimen/_4sdp" + android:paddingRight="@dimen/_4sdp"> - - + android:paddingStart="@dimen/_2sdp" + android:paddingLeft="@dimen/_2sdp" + android:paddingTop="@dimen/_2sdp" + android:text="@string/receipient_gets_text" + android:textColor="@color/darkgray" + android:textSize="@dimen/_12ssp" /> + + - + + + + + + + + + + + + + + + + + + + - + - + - + + - - - - - - - + diff --git a/app/src/main/res/layout/activity_splash_screen_key_2.xml b/app/src/main/res/layout/activity_splash_screen_key_2.xml index 6540a71d..a1f67f9c 100644 --- a/app/src/main/res/layout/activity_splash_screen_key_2.xml +++ b/app/src/main/res/layout/activity_splash_screen_key_2.xml @@ -1,6 +1,7 @@ + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="parent" /> + app:layout_constraintEnd_toEndOf="@+id/btn_login" + app:layout_constraintStart_toStartOf="@+id/btn_login" + app:layout_constraintTop_toBottomOf="@+id/btn_login" /> + app:layout_constraintEnd_toEndOf="@+id/btn_new_user" + app:layout_constraintStart_toStartOf="@+id/btn_new_user" + app:layout_constraintTop_toBottomOf="@+id/btn_new_user" + tools:text=" 2.2.3 " />