|
@ -5,23 +5,6 @@ import android.content.Intent; |
|
|
import android.graphics.Paint; |
|
|
import android.graphics.Paint; |
|
|
import android.graphics.Rect; |
|
|
import android.graphics.Rect; |
|
|
import android.os.Bundle; |
|
|
import android.os.Bundle; |
|
|
import androidx.annotation.NonNull; |
|
|
|
|
|
import androidx.annotation.Nullable; |
|
|
|
|
|
import androidx.appcompat.widget.AppCompatImageView; |
|
|
|
|
|
import androidx.constraintlayout.widget.ConstraintLayout; |
|
|
|
|
|
import androidx.constraintlayout.widget.ConstraintSet; |
|
|
|
|
|
import androidx.transition.ArcMotion; |
|
|
|
|
|
import androidx.transition.ChangeBounds; |
|
|
|
|
|
import androidx.transition.Transition; |
|
|
|
|
|
import androidx.transition.TransitionListenerAdapter; |
|
|
|
|
|
import androidx.transition.TransitionManager; |
|
|
|
|
|
import androidx.core.content.ContextCompat; |
|
|
|
|
|
import androidx.core.view.GestureDetectorCompat; |
|
|
|
|
|
import androidx.core.view.ViewCompat; |
|
|
|
|
|
import androidx.core.view.ViewPropertyAnimatorListenerAdapter; |
|
|
|
|
|
import androidx.recyclerview.widget.RecyclerView; |
|
|
|
|
|
import androidx.recyclerview.widget.StaggeredGridLayoutManager; |
|
|
|
|
|
|
|
|
|
|
|
import android.os.Handler; |
|
|
import android.os.Handler; |
|
|
import android.text.Editable; |
|
|
import android.text.Editable; |
|
|
import android.view.GestureDetector; |
|
|
import android.view.GestureDetector; |
|
@ -38,10 +21,27 @@ import android.widget.ImageView; |
|
|
import android.widget.ProgressBar; |
|
|
import android.widget.ProgressBar; |
|
|
import android.widget.TextView; |
|
|
import android.widget.TextView; |
|
|
|
|
|
|
|
|
|
|
|
import androidx.annotation.NonNull; |
|
|
|
|
|
import androidx.annotation.Nullable; |
|
|
|
|
|
import androidx.appcompat.widget.AppCompatImageView; |
|
|
|
|
|
import androidx.constraintlayout.widget.ConstraintLayout; |
|
|
|
|
|
import androidx.constraintlayout.widget.ConstraintSet; |
|
|
|
|
|
import androidx.core.content.ContextCompat; |
|
|
|
|
|
import androidx.core.view.GestureDetectorCompat; |
|
|
|
|
|
import androidx.core.view.ViewCompat; |
|
|
|
|
|
import androidx.core.view.ViewPropertyAnimatorListenerAdapter; |
|
|
|
|
|
import androidx.recyclerview.widget.RecyclerView; |
|
|
|
|
|
import androidx.recyclerview.widget.StaggeredGridLayoutManager; |
|
|
|
|
|
import androidx.transition.ArcMotion; |
|
|
|
|
|
import androidx.transition.ChangeBounds; |
|
|
|
|
|
import androidx.transition.Transition; |
|
|
|
|
|
import androidx.transition.TransitionListenerAdapter; |
|
|
|
|
|
import androidx.transition.TransitionManager; |
|
|
|
|
|
|
|
|
import com.swifttech.remit.android.R; |
|
|
import com.swifttech.remit.android.R; |
|
|
import com.swifttech.remit.android.base.BaseActivity; |
|
|
import com.swifttech.remit.android.base.BaseActivity; |
|
|
import com.swifttech.remit.android.common.customwidgets.CurrencyFormatterTextWatcher; |
|
|
import com.swifttech.remit.android.common.customwidgets.CurrencyFormatterTextWatcher; |
|
|
import com.swifttech.remit.android.common.customwidgets.GmeEditText; |
|
|
|
|
|
|
|
|
import com.swifttech.remit.android.common.customwidgets.GmeTextView; |
|
|
import com.swifttech.remit.android.common.customwidgets.exchangecountrylistingdialog.CountryFlagMapper; |
|
|
import com.swifttech.remit.android.common.customwidgets.exchangecountrylistingdialog.CountryFlagMapper; |
|
|
import com.swifttech.remit.android.common.customwidgets.exchangecountrylistingdialog.ExchangeRateCurrencyListingDialog; |
|
|
import com.swifttech.remit.android.common.customwidgets.exchangecountrylistingdialog.ExchangeRateCurrencyListingDialog; |
|
|
import com.swifttech.remit.android.features.exrate.gateway.ExchangeRateGateway; |
|
|
import com.swifttech.remit.android.features.exrate.gateway.ExchangeRateGateway; |
|
@ -52,8 +52,6 @@ import com.swifttech.remit.android.features.exrate.presenter.ExchangeRatePresent |
|
|
import com.swifttech.remit.android.features.exrate.view.SelectedRedBorderDecoration; |
|
|
import com.swifttech.remit.android.features.exrate.view.SelectedRedBorderDecoration; |
|
|
import com.swifttech.remit.android.features.home.view.HomeActivityV2; |
|
|
import com.swifttech.remit.android.features.home.view.HomeActivityV2; |
|
|
import com.swifttech.remit.android.features.login.view.LoginV2Activity; |
|
|
import com.swifttech.remit.android.features.login.view.LoginV2Activity; |
|
|
import com.swifttech.remit.android.features.otpverification.view.OTPVerificationActivity; |
|
|
|
|
|
import com.swifttech.remit.android.features.register.view.RegisterV2Activity; |
|
|
|
|
|
import com.swifttech.remit.android.features.registerv2.existingcustomer.view.ExistingCustomerRegisterV2Activity; |
|
|
import com.swifttech.remit.android.features.registerv2.existingcustomer.view.ExistingCustomerRegisterV2Activity; |
|
|
import com.swifttech.remit.android.features.registerv2.newcustomer.view.NewRegisterV2Activity; |
|
|
import com.swifttech.remit.android.features.registerv2.newcustomer.view.NewRegisterV2Activity; |
|
|
import com.swifttech.remit.android.features.settings.gateway.LanguageSelectionGateway; |
|
|
import com.swifttech.remit.android.features.settings.gateway.LanguageSelectionGateway; |
|
@ -118,8 +116,6 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
@BindView(R.id.recepientFlagImageView) |
|
|
@BindView(R.id.recepientFlagImageView) |
|
|
ImageView receivingCountryFlagImageView; |
|
|
ImageView receivingCountryFlagImageView; |
|
|
|
|
|
|
|
|
@BindView(R.id.recepientCurrencyTextView) |
|
|
|
|
|
TextView receivingCurrencyCodeTxtView; |
|
|
|
|
|
|
|
|
|
|
|
@BindView(R.id.transferFeeTxtView) |
|
|
@BindView(R.id.transferFeeTxtView) |
|
|
TextView transferFeeTxtView; |
|
|
TextView transferFeeTxtView; |
|
@ -128,13 +124,18 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
TextView exchangeRateTxtView; |
|
|
TextView exchangeRateTxtView; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@BindView(R.id.gmeExratePC) |
|
|
@BindView(R.id.gmeExratePC) |
|
|
TextView gmeExratePC; |
|
|
TextView gmeExratePC; |
|
|
|
|
|
|
|
|
@BindView(R.id.countrySelectionSpinner) |
|
|
@BindView(R.id.countrySelectionSpinner) |
|
|
View countrySelectionSpinner; |
|
|
View countrySelectionSpinner; |
|
|
|
|
|
|
|
|
|
|
|
@BindView(R.id.recepientCurrencyTextView) |
|
|
|
|
|
GmeTextView recepientCurrencyTextView; |
|
|
|
|
|
|
|
|
|
|
|
@BindView(R.id.countrySelectionSpinnerArrow) |
|
|
|
|
|
ImageView countrySelectionSpinnerArrow; |
|
|
|
|
|
|
|
|
@BindView(R.id.receiveMoneyViewContainer) |
|
|
@BindView(R.id.receiveMoneyViewContainer) |
|
|
View receiveMoneyViewContainer; |
|
|
View receiveMoneyViewContainer; |
|
|
|
|
|
|
|
@ -151,8 +152,6 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
View existing_user_register_txt; |
|
|
View existing_user_register_txt; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LanguageViewTransitionManager languageViewTransitionManager; |
|
|
LanguageViewTransitionManager languageViewTransitionManager; |
|
|
|
|
|
|
|
|
LanguageSelectionRVAdapter languageSelectionRVAdapter; |
|
|
LanguageSelectionRVAdapter languageSelectionRVAdapter; |
|
@ -186,15 +185,15 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
|
|
|
|
|
|
private void performDefaultAction(Bundle savedInstanceState) { |
|
|
private void performDefaultAction(Bundle savedInstanceState) { |
|
|
|
|
|
|
|
|
languageViewTransitionManager.underlineTitleText(true); |
|
|
|
|
|
splashPresenter.checkCurrentSelectedLanguage(); |
|
|
|
|
|
exRatePresenter.getExrateRelatedData(); |
|
|
|
|
|
|
|
|
languageViewTransitionManager.underlineTitleText(true); |
|
|
|
|
|
splashPresenter.checkCurrentSelectedLanguage(); |
|
|
|
|
|
exRatePresenter.getExrateRelatedData(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void init() { |
|
|
private void init() { |
|
|
progressBar.getIndeterminateDrawable().setColorFilter(ContextCompat.getColor(this, android.R.color.white), android.graphics.PorterDuff.Mode.MULTIPLY); |
|
|
progressBar.getIndeterminateDrawable().setColorFilter(ContextCompat.getColor(this, android.R.color.white), android.graphics.PorterDuff.Mode.MULTIPLY); |
|
|
splashPresenter = new SplashScreenPresenter(this,new SplashScreenGateway(), new LanguageSelectionGateway()); |
|
|
|
|
|
exRatePresenter=new ExchangeRatePresenter(this,new ExchangeRateGateway()); |
|
|
|
|
|
|
|
|
splashPresenter = new SplashScreenPresenter(this, new SplashScreenGateway(), new LanguageSelectionGateway()); |
|
|
|
|
|
exRatePresenter = new ExchangeRatePresenter(this, new ExchangeRateGateway()); |
|
|
|
|
|
|
|
|
languageViewTransitionManager = new LanguageViewTransitionManager(this); |
|
|
languageViewTransitionManager = new LanguageViewTransitionManager(this); |
|
|
initLanguageRV(); |
|
|
initLanguageRV(); |
|
@ -214,7 +213,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void initPayoutModeRV() { |
|
|
private void initPayoutModeRV() { |
|
|
SelectedRedBorderDecoration selectedRedBorderDecoration = new SelectedRedBorderDecoration(this,false); |
|
|
|
|
|
|
|
|
SelectedRedBorderDecoration selectedRedBorderDecoration = new SelectedRedBorderDecoration(this, false); |
|
|
paymentModeRV.addItemDecoration(selectedRedBorderDecoration); |
|
|
paymentModeRV.addItemDecoration(selectedRedBorderDecoration); |
|
|
paymentModeRV.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL)); |
|
|
paymentModeRV.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL)); |
|
|
payoutModeSelectionRVAdapter = new PayoutModeSelectionRVAdapter(this); |
|
|
payoutModeSelectionRVAdapter = new PayoutModeSelectionRVAdapter(this); |
|
@ -225,6 +224,8 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
public void onClick(View view) { |
|
|
public void onClick(View view) { |
|
|
switch (view.getId()) { |
|
|
switch (view.getId()) { |
|
|
case R.id.countrySelectionSpinner: |
|
|
case R.id.countrySelectionSpinner: |
|
|
|
|
|
case R.id.recepientCurrencyTextView: |
|
|
|
|
|
case R.id.countrySelectionSpinnerArrow: |
|
|
showCountryListinDialog(); |
|
|
showCountryListinDialog(); |
|
|
break; |
|
|
break; |
|
|
case R.id.btn_rgstr: |
|
|
case R.id.btn_rgstr: |
|
@ -239,7 +240,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
onBackPressed(); |
|
|
onBackPressed(); |
|
|
break; |
|
|
break; |
|
|
case R.id.existing_user_register_txt: |
|
|
case R.id.existing_user_register_txt: |
|
|
Intent intent=new Intent(this,ExistingCustomerRegisterV2Activity.class); |
|
|
|
|
|
|
|
|
Intent intent = new Intent(this, ExistingCustomerRegisterV2Activity.class); |
|
|
startActivity(intent); |
|
|
startActivity(intent); |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
@ -262,13 +263,14 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
selectedLanguageText.setOnClickListener(this); |
|
|
selectedLanguageText.setOnClickListener(this); |
|
|
selectedLanguageIcon.setOnClickListener(this); |
|
|
selectedLanguageIcon.setOnClickListener(this); |
|
|
countrySelectionSpinner.setOnClickListener(this); |
|
|
countrySelectionSpinner.setOnClickListener(this); |
|
|
|
|
|
recepientCurrencyTextView.setOnClickListener(this); |
|
|
|
|
|
countrySelectionSpinnerArrow.setOnClickListener(this); |
|
|
receiveAmountEdTxt.setOnEditorActionListener(this); |
|
|
receiveAmountEdTxt.setOnEditorActionListener(this); |
|
|
sendAmountEdTxt.setOnEditorActionListener(this); |
|
|
sendAmountEdTxt.setOnEditorActionListener(this); |
|
|
existing_user_register_txt.setOnClickListener(this); |
|
|
existing_user_register_txt.setOnClickListener(this); |
|
|
selectLangBg.setOnClickListener(this); |
|
|
selectLangBg.setOnClickListener(this); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
@ -280,6 +282,8 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
selectedLanguageText.setOnClickListener(null); |
|
|
selectedLanguageText.setOnClickListener(null); |
|
|
selectedLanguageIcon.setOnClickListener(null); |
|
|
selectedLanguageIcon.setOnClickListener(null); |
|
|
countrySelectionSpinner.setOnClickListener(null); |
|
|
countrySelectionSpinner.setOnClickListener(null); |
|
|
|
|
|
recepientCurrencyTextView.setOnClickListener(null); |
|
|
|
|
|
countrySelectionSpinnerArrow.setOnClickListener(null); |
|
|
receiveAmountEdTxt.setOnEditorActionListener(null); |
|
|
receiveAmountEdTxt.setOnEditorActionListener(null); |
|
|
sendAmountEdTxt.setOnEditorActionListener(null); |
|
|
sendAmountEdTxt.setOnEditorActionListener(null); |
|
|
existing_user_register_txt.setOnClickListener(null); |
|
|
existing_user_register_txt.setOnClickListener(null); |
|
@ -316,9 +320,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
super.onNewIntent(intent); |
|
|
super.onNewIntent(intent); |
|
|
try { |
|
|
try { |
|
|
performDefaultAction(null); |
|
|
performDefaultAction(null); |
|
|
} |
|
|
|
|
|
catch(Exception e) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
restartApp(); |
|
|
restartApp(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -356,7 +358,6 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void showAppVersion(String appVersion) { |
|
|
public void showAppVersion(String appVersion) { |
|
|
appVersionTxtView.setText(appVersion); |
|
|
appVersionTxtView.setText(appVersion); |
|
@ -380,7 +381,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
countryListingDialog.show(getSupportFragmentManager(), "GenericTextListingDialog"); |
|
|
countryListingDialog.show(getSupportFragmentManager(), "GenericTextListingDialog"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void startSendAmountListener(boolean action) { |
|
|
|
|
|
|
|
|
private void startSendAmountListener(boolean action) { |
|
|
if (action) { |
|
|
if (action) { |
|
|
sendAmountEdTxt.addTextChangedListener(sendMoneyTextWatcher); |
|
|
sendAmountEdTxt.addTextChangedListener(sendMoneyTextWatcher); |
|
|
} else { |
|
|
} else { |
|
@ -419,7 +420,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void showSelectedPayoutCurrency(CountryPaymentService selectedPayoutCountryCurrency) { |
|
|
public void showSelectedPayoutCurrency(CountryPaymentService selectedPayoutCountryCurrency) { |
|
|
receivingCurrencyCodeTxtView.setText(selectedPayoutCountryCurrency.getCurrency()); |
|
|
|
|
|
|
|
|
recepientCurrencyTextView.setText(selectedPayoutCountryCurrency.getCurrency()); |
|
|
receivingCountryFlagImageView.setBackgroundResource(CountryFlagMapper.getFlagFromCountryCode(selectedPayoutCountryCurrency.getCountryCode())); |
|
|
receivingCountryFlagImageView.setBackgroundResource(CountryFlagMapper.getFlagFromCountryCode(selectedPayoutCountryCurrency.getCountryCode())); |
|
|
receivingCountryFlagImageView.setBackgroundResource(CountryFlagMapper.getFlagFromCountryCode(selectedPayoutCountryCurrency.getCountryCode())); |
|
|
receivingCountryFlagImageView.setBackgroundResource(CountryFlagMapper.getFlagFromCountryCode(selectedPayoutCountryCurrency.getCountryCode())); |
|
|
|
|
|
|
|
@ -427,7 +428,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void showTransferChargeAndExrate(String chargeAmount, String exRate,String formattedExRate, boolean playAnimation) { |
|
|
|
|
|
|
|
|
public void showTransferChargeAndExrate(String chargeAmount, String exRate, String formattedExRate, boolean playAnimation) { |
|
|
if (playAnimation) { |
|
|
if (playAnimation) { |
|
|
transferFeeTxtView.setVisibility(View.INVISIBLE); |
|
|
transferFeeTxtView.setVisibility(View.INVISIBLE); |
|
|
exchangeRateTxtView.setVisibility(View.INVISIBLE); |
|
|
exchangeRateTxtView.setVisibility(View.INVISIBLE); |
|
@ -447,7 +448,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
gmeExratePC.setText(formattedExRate); |
|
|
gmeExratePC.setText(formattedExRate); |
|
|
|
|
|
|
|
|
transferFeeTxtView.animate().alpha(1f).setDuration(500).withLayer().withStartAction( |
|
|
transferFeeTxtView.animate().alpha(1f).setDuration(500).withLayer().withStartAction( |
|
|
()-> exchangeRateTxtView.animate().alpha(1f).setDuration(500).withLayer().start() |
|
|
|
|
|
|
|
|
() -> exchangeRateTxtView.animate().alpha(1f).setDuration(500).withLayer().start() |
|
|
).start(); |
|
|
).start(); |
|
|
|
|
|
|
|
|
gmeExratePC.animate().alpha(1f).setDuration(500).withLayer().start(); |
|
|
gmeExratePC.animate().alpha(1f).setDuration(500).withLayer().start(); |
|
@ -648,7 +649,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
isExrateViewVisible = true; |
|
|
isExrateViewVisible = true; |
|
|
isAnimationOnProgress = false; |
|
|
isAnimationOnProgress = false; |
|
|
userNavigatedToLanguageView = false; |
|
|
userNavigatedToLanguageView = false; |
|
|
new Handler().postDelayed(()-> exRatePresenter.onExRateViewLoadedSuccessfully(),150); |
|
|
|
|
|
|
|
|
new Handler().postDelayed(() -> exRatePresenter.onExRateViewLoadedSuccessfully(), 150); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
@ -791,8 +792,6 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
btnRegisterLeftAndTopCoordinates[1] + btn_new_user.getMeasuredHeight()); |
|
|
btnRegisterLeftAndTopCoordinates[1] + btn_new_user.getMeasuredHeight()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (receiveAmountEdTxt.hasFocus() || sendAmountEdTxt.hasFocus()) |
|
|
return (receiveAmountEdTxt.hasFocus() || sendAmountEdTxt.hasFocus()) |
|
|
&& !sendMoneyBoundRect.contains(posX, posY) |
|
|
&& !sendMoneyBoundRect.contains(posX, posY) |
|
|
&& !receiveMoneyBoundRect.contains(posX, posY) |
|
|
&& !receiveMoneyBoundRect.contains(posX, posY) |
|
@ -807,7 +806,4 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |