diff --git a/.idea/assetWizardSettings.xml b/.idea/assetWizardSettings.xml
index c385b7eb..cd5095ba 100644
--- a/.idea/assetWizardSettings.xml
+++ b/.idea/assetWizardSettings.xml
@@ -318,8 +318,8 @@
diff --git a/app/build.gradle b/app/build.gradle
index 49beb025..e0d38ab0 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -135,21 +135,21 @@ android {
buildConfigField 'String', 'SecretKey', '"QRK2UM0Q"'
// TrustDock
// UAT
-// buildConfigField 'String', 'TrustDockAuthorizationId', '"SC5ra2f1GDqMaAVZX289bpuH"'
-// buildConfigField 'String', 'TrustDockNativeAppSdkToken', '"rbTme8F4whfAZBuSQcN5gUXr"'
-// buildConfigField 'String', 'ResidenceCardWithNFCPlanId', '"b1da18ee-fabe-42f0-b7f6-0d375e1f505d"'
-// buildConfigField 'String', 'SelfieVerificationPlanId', '"ee46f7fd-3988-49cd-a972-1056e498302f"'
-// buildConfigField 'String', 'ResidenceCardWithoutNFCPlanId', '"9390019a-d41f-42a8-b044-0f41a9825847"'
-// buildConfigField 'String', 'DrivingLicenseWithNFCPlanId', '"f8d1f271-7c95-43bf-bdf8-f84ebe96671d"'
-// buildConfigField 'String', 'TrustDockVerificationUrl', '"https://api.test.trustdock.io/v2/verifications"'
+ buildConfigField 'String', 'TrustDockAuthorizationId', '"SC5ra2f1GDqMaAVZX289bpuH"'
+ buildConfigField 'String', 'TrustDockNativeAppSdkToken', '"rbTme8F4whfAZBuSQcN5gUXr"'
+ buildConfigField 'String', 'ResidenceCardWithNFCPlanId', '"b1da18ee-fabe-42f0-b7f6-0d375e1f505d"'
+ buildConfigField 'String', 'SelfieVerificationPlanId', '"ee46f7fd-3988-49cd-a972-1056e498302f"'
+ buildConfigField 'String', 'ResidenceCardWithoutNFCPlanId', '"9390019a-d41f-42a8-b044-0f41a9825847"'
+ buildConfigField 'String', 'DrivingLicenseWithNFCPlanId', '"f8d1f271-7c95-43bf-bdf8-f84ebe96671d"'
+ buildConfigField 'String', 'TrustDockVerificationUrl', '"https://api.test.trustdock.io/v2/verifications"'
// PROD
- buildConfigField 'String', 'TrustDockAuthorizationId', '"gC8ULGtvqiwkMqTx4NzQexLL"'
- buildConfigField 'String', 'TrustDockNativeAppSdkToken', '"KYyzZzDyneU6P9CTe8ZaveyK"'
- buildConfigField 'String', 'ResidenceCardWithNFCPlanId', '"17f3f05f-f436-41f0-8b1c-434ee2b5e6ec"'
- buildConfigField 'String', 'SelfieVerificationPlanId', '"295735e5-022b-44b8-8c35-59604c425daa"'
- buildConfigField 'String', 'ResidenceCardWithoutNFCPlanId', '"039cfef5-0248-44c4-8464-25baef241f05"'
- buildConfigField 'String', 'DrivingLicenseWithNFCPlanId', '"6eaba29b-3f40-469d-9a7e-afb33252b10e"'
- buildConfigField 'String', 'TrustDockVerificationUrl', '"https://api.trustdock.io/v2/verifications"'
+// buildConfigField 'String', 'TrustDockAuthorizationId', '"gC8ULGtvqiwkMqTx4NzQexLL"'
+// buildConfigField 'String', 'TrustDockNativeAppSdkToken', '"KYyzZzDyneU6P9CTe8ZaveyK"'
+// buildConfigField 'String', 'ResidenceCardWithNFCPlanId', '"17f3f05f-f436-41f0-8b1c-434ee2b5e6ec"'
+// buildConfigField 'String', 'SelfieVerificationPlanId', '"295735e5-022b-44b8-8c35-59604c425daa"'
+// buildConfigField 'String', 'ResidenceCardWithoutNFCPlanId', '"039cfef5-0248-44c4-8464-25baef241f05"'
+// buildConfigField 'String', 'DrivingLicenseWithNFCPlanId', '"6eaba29b-3f40-469d-9a7e-afb33252b10e"'
+// buildConfigField 'String', 'TrustDockVerificationUrl', '"https://api.trustdock.io/v2/verifications"'
//
debuggable true
minifyEnabled false
diff --git a/app/src/main/java/com/remit/jmecustomer/features/exrate/presenter/ExchangeRatePresenter.java b/app/src/main/java/com/remit/jmecustomer/features/exrate/presenter/ExchangeRatePresenter.java
index 582e8f81..1c04e8ba 100644
--- a/app/src/main/java/com/remit/jmecustomer/features/exrate/presenter/ExchangeRatePresenter.java
+++ b/app/src/main/java/com/remit/jmecustomer/features/exrate/presenter/ExchangeRatePresenter.java
@@ -1,6 +1,10 @@
package com.remit.jmecustomer.features.exrate.presenter;
+import android.graphics.Color;
import android.os.Handler;
+import android.text.Spannable;
+import android.text.SpannableString;
+import android.text.style.ForegroundColorSpan;
import com.remit.jmecustomer.R;
import com.remit.jmecustomer.base.BasePresenter;
@@ -43,6 +47,8 @@ public class ExchangeRatePresenter extends BasePresenter implements ExchangeRate
private String cAmount;
private String pAmount;
+ private boolean isHome = false;
+
public ExchangeRatePresenter(ExchangeRatePresenterInterface.ExchangeRateContractInterfacee view, ExchangeRateInteractorInterface.ExchangeRateGatewayInterface gateway) {
this.view = view;
this.gateway = gateway;
@@ -51,6 +57,15 @@ public class ExchangeRatePresenter extends BasePresenter implements ExchangeRate
pAmount = "";
}
+ public ExchangeRatePresenter(ExchangeRatePresenterInterface.ExchangeRateContractInterfacee view, ExchangeRateInteractorInterface.ExchangeRateGatewayInterface gateway, boolean isHome) {
+ this.view = view;
+ this.gateway = gateway;
+ this.compositeDisposables = new CompositeDisposable();
+ cAmount = "";
+ pAmount = "";
+ this.isHome = isHome;
+ }
+
@Override
public void getExrateRelatedData() {
compositeDisposables.add(
@@ -127,19 +142,19 @@ public class ExchangeRatePresenter extends BasePresenter implements ExchangeRate
String calculateFlag = calcByPayoutAmount ? Constants.CALC_BY_RECIPEINT : Constants.CALC_BY_SENDER;
compositeDisposables.add(
this.gateway.sendDataForForexCalculation(
- gateway.getBasicAuth(view.getContext()),
- gateway.getUserPreferredCountryId(),
- gateway.getUserPreferredCurrency(),
- selectedCountryPaymentService.getCurrency(),
- Utils.removeCommaFromAmount(cAmount),
- Utils.removeCommaFromAmount(pAmount),
- selectedPaymentMode.getId(),
- calculateFlag,
- selectedCountryPaymentService.getCountry(),
- selectedCountryPaymentService.getCountryId()
- ).doOnSubscribe(disposable -> {
- this.view.showProgressBar(true, getStringfromStringId(R.string.processing_request_text));
- })
+ gateway.getBasicAuth(view.getContext()),
+ gateway.getUserPreferredCountryId(),
+ gateway.getUserPreferredCurrency(),
+ selectedCountryPaymentService.getCurrency(),
+ Utils.removeCommaFromAmount(cAmount),
+ Utils.removeCommaFromAmount(pAmount),
+ selectedPaymentMode.getId(),
+ calculateFlag,
+ selectedCountryPaymentService.getCountry(),
+ selectedCountryPaymentService.getCountryId()
+ ).doOnSubscribe(disposable -> {
+ this.view.showProgressBar(true, getStringfromStringId(R.string.processing_request_text));
+ })
.doOnError((err) -> this.view.showProgressBar(false, ""))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@@ -312,7 +327,22 @@ public class ExchangeRatePresenter extends BasePresenter implements ExchangeRate
String exRateFormatted = getStringfromStringId(R.string.current_exchange_rate_text) + " 1 " + data.getpCurr().toUpperCase() + " = " + Double.valueOf(df.format(exRate_p_c)) + " " + data.getCollCurr();
- view.showTransferChargeAndExrate(transferDisplay, exRateDisplay, exRateFormatted, true);
+ if (isHome) {
+ String fullTextTransfer = transferAmount + " " + sendingCurrency + " " + getStringfromStringId(R.string.transfer_fee_included_text);
+
+ String fullTextRate = exRate + " " + getStringfromStringId(R.string.current_exchange_rate_text);
+
+
+ view.showTransferChargeAndExrate(fullTextTransfer.trim(),
+ fullTextRate,
+ exRateFormatted,
+ true);
+ } else {
+ view.showTransferChargeAndExrate(transferDisplay,
+ exRateDisplay,
+ exRateFormatted,
+ true);
+ }
view.showPayoutAmount(Utils.formatCurrencyWithoutTruncatingDecimal(pAmount));
view.showCollectionAmount(Utils.formatCurrency(cAmount));
} else {
diff --git a/app/src/main/java/com/remit/jmecustomer/features/homeV3/view/HomeFragmentV3.kt b/app/src/main/java/com/remit/jmecustomer/features/homeV3/view/HomeFragmentV3.kt
index d2f1a92e..be2cff77 100644
--- a/app/src/main/java/com/remit/jmecustomer/features/homeV3/view/HomeFragmentV3.kt
+++ b/app/src/main/java/com/remit/jmecustomer/features/homeV3/view/HomeFragmentV3.kt
@@ -4,10 +4,14 @@ import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
+import android.graphics.Color
import android.graphics.Rect
import android.os.Bundle
import android.os.Handler
import android.text.Editable
+import android.text.Spannable
+import android.text.SpannableString
+import android.text.style.ForegroundColorSpan
import android.view.*
import android.view.GestureDetector.SimpleOnGestureListener
import android.view.ViewTreeObserver.OnGlobalLayoutListener
@@ -25,7 +29,6 @@ import androidx.transition.AutoTransition
import androidx.transition.Transition
import androidx.transition.TransitionListenerAdapter
import androidx.transition.TransitionManager
-import androidx.transition.Visibility
import com.bumptech.glide.Glide
import com.bumptech.glide.request.RequestOptions
import com.bumptech.glide.signature.ObjectKey
@@ -195,7 +198,7 @@ class HomeFragmentV3 : BaseFragment(), View.OnClickListener,
viewModel = ViewModelProvider(this, UserProfileViewModelFactory(this)).get(
UserProfilePresenterV2::class.java
)
- presenter = ExchangeRatePresenter(this, ExchangeRateGateway())
+ presenter = ExchangeRatePresenter(this, ExchangeRateGateway(), true)
sendMoneyEditText = binding.sendAmountEdTxt
recieveMoneyEditText = binding.receiveAmountEdTxt
transferFeeTxtView = binding.tvTransfer1
@@ -339,7 +342,8 @@ class HomeFragmentV3 : BaseFragment(), View.OnClickListener,
) {
if (playAnimation) {
exchangeRateTxtView!!.visibility = View.INVISIBLE
- exchangeRateTxtView!!.text = exRate
+ exchangeRateTxtView!!.text =
+ makeSpannable(exRate!!, getString(R.string.current_exchange_rate_text))
exchangeRateTxtView!!.translationY = exchangeRateTxtView!!.height.toFloat()
exchangeRateTxtView!!.visibility = View.VISIBLE
ViewCompat.animate(exchangeRateTxtView!!).translationY(0f).setDuration(550)
@@ -347,7 +351,8 @@ class HomeFragmentV3 : BaseFragment(), View.OnClickListener,
interpolator
).start()
transferFeeTxtView!!.visibility = View.INVISIBLE
- transferFeeTxtView!!.text = chargeAmount
+ transferFeeTxtView!!.text =
+ makeSpannable(chargeAmount!!, getString(R.string.transfer_fee_included_text))
transferFeeTxtView!!.translationY = transferFeeTxtView!!.height.toFloat()
transferFeeTxtView!!.visibility = View.VISIBLE
ViewCompat.animate(transferFeeTxtView!!).translationY(0f).setDuration(550)
@@ -360,8 +365,10 @@ class HomeFragmentV3 : BaseFragment(), View.OnClickListener,
// jmeExratePC.setVisibility(View.INVISIBLE)
// jmeExratePC.animate().alpha(1f).setDuration(500).withLayer().start()
} else {
- transferFeeTxtView!!.text = chargeAmount
- exchangeRateTxtView!!.text = exRate
+ transferFeeTxtView!!.text =
+ makeSpannable(chargeAmount!!, getString(R.string.transfer_fee_included_text))
+ exchangeRateTxtView!!.text =
+ makeSpannable(exRate!!, getString(R.string.current_exchange_rate_text))
// jmeExratePC.setText(formattedExRate)
}
}
@@ -597,4 +604,19 @@ class HomeFragmentV3 : BaseFragment(), View.OnClickListener,
)
}, 500)
}
-}
\ No newline at end of file
+
+ fun makeSpannable(fullText: String, blueText: String): SpannableString {
+ if (fullText.isEmpty()) {
+ return SpannableString("")
+ }
+// Find the start and end indices of the blue text
+ val startIndex = fullText.indexOf(blueText)
+ val endIndex: Int = startIndex + blueText.length
+
+// Create a SpannableString with the blue color
+ val spannableString = SpannableString(fullText)
+ val colorSpan = ForegroundColorSpan(resources.getColor(R.color.light_blue))
+ spannableString.setSpan(colorSpan, startIndex, endIndex, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
+ return spannableString
+ }
+}
diff --git a/app/src/main/java/com/remit/jmecustomer/features/sendmoney/view/amountdetail/AmountDetailSendMoneyFragment.java b/app/src/main/java/com/remit/jmecustomer/features/sendmoney/view/amountdetail/AmountDetailSendMoneyFragment.java
index d9f6ea48..145579f6 100644
--- a/app/src/main/java/com/remit/jmecustomer/features/sendmoney/view/amountdetail/AmountDetailSendMoneyFragment.java
+++ b/app/src/main/java/com/remit/jmecustomer/features/sendmoney/view/amountdetail/AmountDetailSendMoneyFragment.java
@@ -4,6 +4,7 @@ import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
+import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
@@ -16,7 +17,10 @@ import androidx.core.widget.NestedScrollView;
import androidx.lifecycle.ViewModelProvider;
import android.text.Editable;
+import android.text.Spannable;
+import android.text.SpannableString;
import android.text.TextWatcher;
+import android.text.style.ForegroundColorSpan;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
@@ -147,7 +151,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
viewmodel.subscribeToRewardsPoint().observe(getViewLifecycleOwner(), this::updateRewardDetails);
}
- private void setDefaultAmount(){
+ private void setDefaultAmount() {
sendMoneyEditText.setText("100000");
getForex();
}
@@ -248,8 +252,8 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
selectedTransferAmount = data.getsAmt();
- String transferDisplay = " -" + Utils.formatCurrency(selectedTransferFeeAmount) + " " + selectedsendingCurrency + "\n (" + getString(R.string.transfer_fee_included_text) + ")";
- String exRateDisplay = " " + selectedExRate + "\n (" + getString(R.string.current_exchange_rate_text) + ")";
+ String transferDisplay = " -" + Utils.formatCurrency(selectedTransferFeeAmount) + " " + selectedsendingCurrency + " " + getString(R.string.transfer_fee_included_text);
+ String exRateDisplay = " " + selectedExRate + " " + getString(R.string.current_exchange_rate_text);
showTransferfeeAndExRate(true, transferDisplay, exRateDisplay, "");
showSendAndRecieveAmount(selectedSendAmount, selectedRecipientAmount);
@@ -320,10 +324,9 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
private void showTransferfeeAndExRate(boolean action, String transferDisplay, String exRateDisplay, String discountValue) {
if (action) {
-
if (this.exchangeRateTxtView.getVisibility() == View.VISIBLE)
this.exchangeRateTxtView.setVisibility(View.INVISIBLE);
- this.exchangeRateTxtView.setText(exRateDisplay);
+ this.exchangeRateTxtView.setText(makeSpannable(exRateDisplay, getString(R.string.current_exchange_rate_text)));
this.exchangeRateTxtView.setTranslationY(this.exchangeRateTxtView.getHeight());
this.exchangeRateTxtView.setVisibility(View.VISIBLE);
ViewCompat.animate(this.exchangeRateTxtView).translationY(0).setDuration(550).setInterpolator(this.interpolator).start();
@@ -332,7 +335,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
if (this.transferFeeTxtView.getVisibility() == View.VISIBLE)
this.transferFeeTxtView.setVisibility(View.INVISIBLE);
- transferFeeTxtView.setText(transferDisplay);
+ transferFeeTxtView.setText(makeSpannable(transferDisplay, getString(R.string.transfer_fee_included_text)));
this.transferFeeTxtView.setTranslationY(this.transferFeeTxtView.getHeight());
this.transferFeeTxtView.setVisibility(View.VISIBLE);
@@ -635,4 +638,16 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
intent.putExtra(RecipientAddEditV3Activity.RECIPIENT_INFO_BUNDLE_KEY_v3, recipientInfoModel);
startActivityForResult(intent, RecipientAddEditV3Activity.RECIPIENT_ACTION_EDIT_REQUEST_CODE_v3);
}
+
+ public SpannableString makeSpannable(String fullText, String blueText) {
+
+ int startIndex = fullText.indexOf(blueText);
+ int endIndex = startIndex + blueText.length();
+
+ SpannableString spannableString = new SpannableString(fullText);
+ ForegroundColorSpan colorSpan = new ForegroundColorSpan(getResources().getColor(R.color.light_blue));
+ spannableString.setSpan(colorSpan, startIndex, endIndex, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+
+ return spannableString;
+ }
}
diff --git a/app/src/main/res/drawable/black_border_white_background.xml b/app/src/main/res/drawable/black_border_white_background.xml
new file mode 100644
index 00000000..4925ed5c
--- /dev/null
+++ b/app/src/main/res/drawable/black_border_white_background.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_change_field.xml b/app/src/main/res/drawable/ic_change_field.xml
new file mode 100644
index 00000000..a4acd536
--- /dev/null
+++ b/app/src/main/res/drawable/ic_change_field.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_amount_detail_send_money_v2.xml b/app/src/main/res/layout/fragment_amount_detail_send_money_v2.xml
index 28d7a95c..c3a489e9 100644
--- a/app/src/main/res/layout/fragment_amount_detail_send_money_v2.xml
+++ b/app/src/main/res/layout/fragment_amount_detail_send_money_v2.xml
@@ -18,9 +18,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_10sdp"
+ app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/black_rounded_border"
android:paddingStart="@dimen/_13sdp"
- app:layout_constraintTop_toTopOf="parent">
+ >
-
-
+
+
+
+
+ >
+
+
-
-
+ />
@@ -233,7 +241,7 @@
style="@style/TextStyle.VolteSemiBold16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_margin="@dimen/_10sdp"
+ android:layout_marginRight="@dimen/_50sdp"
android:text="JPY"
android:textColor="@color/black_opacity_87"
app:layout_constraintBottom_toBottomOf="parent"
@@ -246,7 +254,7 @@
android:id="@+id/iv_currency_2"
android:layout_width="@dimen/_30sdp"
android:layout_height="@dimen/_30sdp"
- android:layout_marginRight="@dimen/_40sdp"
+ android:layout_marginRight="@dimen/_10sdp"
android:src="@drawable/flag_nepal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@@ -255,6 +263,26 @@
app:layout_constraintVertical_bias="0.5" />
+
+
+
+
+
+
+
+
+ app:layout_constraintTop_toBottomOf="@id/const_send_receive" />