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 8cbd1df5..380d0822 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 @@ -3,25 +3,40 @@ package com.gmeremit.online.gmeremittance_native.splash_screen.view; import android.content.Context; import android.content.Intent; import android.os.Bundle; +import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.constraint.ConstraintLayout; +import android.support.constraint.ConstraintSet; +import android.support.transition.ChangeBounds; +import android.support.transition.ChangeClipBounds; +import android.support.transition.ChangeScroll; +import android.support.transition.ChangeTransform; +import android.support.transition.Explode; +import android.support.transition.Transition; +import android.support.transition.TransitionListenerAdapter; +import android.support.transition.TransitionManager; +import android.support.transition.Visibility; import android.support.v4.content.ContextCompat; import android.support.v4.view.PagerAdapter; +import android.support.v4.view.ViewCompat; import android.support.v4.view.ViewPager; +import android.support.v4.view.ViewPropertyAnimatorListenerAdapter; import android.support.v7.app.AppCompatActivity; import android.text.Html; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.widget.FrameLayout; +import android.view.animation.AccelerateDecelerateInterpolator; +import android.view.animation.AnticipateInterpolator; +import android.view.animation.AnticipateOvershootInterpolator; +import android.view.animation.Interpolator; import android.widget.LinearLayout; import android.widget.TextView; import com.gmeremit.online.gmeremittance_native.R; import com.gmeremit.online.gmeremittance_native.homeV2.view.HomeActivityV2; -import com.gmeremit.online.gmeremittance_native.invite.view.InviteActivity; import com.gmeremit.online.gmeremittance_native.loginV2.view.LoginV2Activity; import com.gmeremit.online.gmeremittance_native.registerV2.view.RegisterV2Activity; -import com.gmeremit.online.gmeremittance_native.reward_points.view.RewardPointsActivity; import com.gmeremit.online.gmeremittance_native.utils.KeyboardUtils; import com.gmeremit.online.gmeremittance_native.utils.other.PersistenceStorageManager; @@ -43,8 +58,17 @@ public class SplashScreen extends AppCompatActivity { @BindView(R.id.layoutDots) LinearLayout dotsLayout; + @BindView(R.id.rootLayout) + ConstraintLayout rootLayout; + + @BindView(R.id.languageView) + View languageView; + private int[] layouts; private TextView[] dots; + + private ConstraintSet constraintSet; + /** * ViewPager OnPageChangeListener Implementation */ @@ -69,13 +93,14 @@ public class SplashScreen extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.activity_splash_screen_v2); + setContentView(R.layout.activity_splash_screen_key_1); init(); } private void init() { ButterKnife.bind(this); + constraintSet= new ConstraintSet(); persistenceStorageManager = new PersistenceStorageManager(this); // Setting Notification as True By Default @@ -117,7 +142,8 @@ public class SplashScreen extends AppCompatActivity { public void onClick(View view) { switch (view.getId()) { case R.id.btn_login: - startActivity(new Intent(this, LoginV2Activity.class)); + showLanguage(); +// startActivity(new Intent(this, LoginV2Activity.class)); break; case R.id.btn_new_user: startActivity(new Intent(this, RegisterV2Activity.class)); @@ -125,6 +151,29 @@ public class SplashScreen extends AppCompatActivity { } } + private void showLanguage() { + constraintSet.clone(this, R.layout.activity_splash_screen_key_2); + + Transition transition = new ChangeBounds(); + transition.setInterpolator(new AnticipateOvershootInterpolator(1.2f)); + transition.setDuration(1000); + transition.addListener(new TransitionListenerAdapter(){ + @Override + public void onTransitionStart(@NonNull Transition transition) { + super.onTransitionStart(transition); + ViewCompat.animate(view_pager).withLayer().alpha(0f).setDuration(300).setInterpolator(new AccelerateDecelerateInterpolator()).setListener(new ViewPropertyAnimatorListenerAdapter(){ + @Override + public void onAnimationEnd(View view) { + super.onAnimationEnd(view); + + } + }).start(); + } + }); + TransitionManager.beginDelayedTransition(rootLayout, transition); + constraintSet.applyTo(rootLayout); + } + @Override protected void onResume() { super.onResume(); diff --git a/app/src/main/res/drawable/language.png b/app/src/main/res/drawable/language.png new file mode 100644 index 00000000..ced0f60e Binary files /dev/null and b/app/src/main/res/drawable/language.png differ diff --git a/app/src/main/res/layout/activity_splash_screen_v2.xml b/app/src/main/res/layout/activity_splash_screen_key_1.xml similarity index 53% rename from app/src/main/res/layout/activity_splash_screen_v2.xml rename to app/src/main/res/layout/activity_splash_screen_key_1.xml index 57897720..35733b4e 100644 --- a/app/src/main/res/layout/activity_splash_screen_v2.xml +++ b/app/src/main/res/layout/activity_splash_screen_key_1.xml @@ -1,43 +1,83 @@ - + + + + + + + + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/selectedLanguageIcon" /> + app:layout_constraintBottom_toTopOf="@+id/btn_login" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + - \ No newline at end of file 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 new file mode 100644 index 00000000..12740b6c --- /dev/null +++ b/app/src/main/res/layout/activity_splash_screen_key_2.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/fragment_splash_one.xml b/app/src/main/res/layout/fragment_splash_one.xml index ae49471a..3d2c2cef 100644 --- a/app/src/main/res/layout/fragment_splash_one.xml +++ b/app/src/main/res/layout/fragment_splash_one.xml @@ -1,6 +1,7 @@ + app:layout_constraintVertical_bias="0.32" /> diff --git a/app/src/main/res/layout/fragment_splash_three.xml b/app/src/main/res/layout/fragment_splash_three.xml index e9addc85..d7e9399a 100644 --- a/app/src/main/res/layout/fragment_splash_three.xml +++ b/app/src/main/res/layout/fragment_splash_three.xml @@ -7,34 +7,33 @@ android:layout_height="match_parent" android:background="@color/colorPrimary"> - + - + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_splash_two.xml b/app/src/main/res/layout/fragment_splash_two.xml index f8e17d2d..95fa2d22 100644 --- a/app/src/main/res/layout/fragment_splash_two.xml +++ b/app/src/main/res/layout/fragment_splash_two.xml @@ -7,34 +7,33 @@ android:layout_height="match_parent" android:background="@color/colorPrimary"> - + - + \ No newline at end of file diff --git a/app/src/main/res/values-hdpi/dimens.xml b/app/src/main/res/values-hdpi/dimens.xml new file mode 100644 index 00000000..99e9e663 --- /dev/null +++ b/app/src/main/res/values-hdpi/dimens.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index d9e26065..44bf5125 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -6,4 +6,6 @@ 50dp 4dp 7dp + 32dp + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b2c5fae0..59580cb2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -29,9 +29,9 @@ Transactions Amendment Request General Enquiry Subject - Hassle free money transfer to your \nloved ones + Hassle free money transfer to your\nloved ones Connect to local community - Earn reward points and get \nsurprise gifts + Earn reward points and get\nsurprise gifts Thank you for contacting us. GME Wallet No.