Browse Source

Locale fixes for transaction password prompt activity

master
preyearegmi 6 years ago
parent
commit
ebf5ead9a8
  1. 3
      app/src/main/java/com/gmeremit/online/gmeremittance_native/transactionpasspromt/presenter/TransactionPasswordPromptV2Presenter.java
  2. 18
      app/src/main/java/com/gmeremit/online/gmeremittance_native/transactionpasspromt/view/TransactionPasswordPromptActivity.java
  3. 3
      app/src/main/res/values/strings.xml

3
app/src/main/java/com/gmeremit/online/gmeremittance_native/transactionpasspromt/presenter/TransactionPasswordPromptV2Presenter.java

@ -1,5 +1,6 @@
package com.gmeremit.online.gmeremittance_native.transactionpasspromt.presenter;
import com.gmeremit.online.gmeremittance_native.R;
import com.gmeremit.online.gmeremittance_native.base.BasePresenter;
import com.gmeremit.online.gmeremittance_native.customwidgets.CustomAlertDialog;
import com.gmeremit.online.gmeremittance_native.transactionpasspromt.gateway.TransactionPasswordPromptV2Gateway;
@ -32,7 +33,7 @@ public class TransactionPasswordPromptV2Presenter extends BasePresenter implemen
public void getOtp() {
this.compositeDisposable.add(
this.gateway.requestOtp(this.gateway.getAuth(),this.gateway.getUserID())
.doOnSubscribe(disposable -> view.showProgressBar(true, "Requesting OTP..."))
.doOnSubscribe(disposable -> view.showProgressBar(true, getStringfromStringId(R.string.requesting_otp_text)))
.doFinally(() -> view.showProgressBar(false, ""))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())

18
app/src/main/java/com/gmeremit/online/gmeremittance_native/transactionpasspromt/view/TransactionPasswordPromptActivity.java

@ -217,11 +217,11 @@ public class TransactionPasswordPromptActivity extends BaseActivity implements S
String timeRemaining = String.format(Locale.US, "%02d", minutes)
+ ":" + String.format(Locale.US, "%02d", seconds);
Spannable tryInText = new SpannableString("Try again in ");
Spannable tryInText = new SpannableString(getString(R.string.resend_code_text));
tryInText.setSpan(new ForegroundColorSpan(grayColor), 0, tryInText.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
resendRequest.setText(tryInText);
Spannable timeText = new SpannableString(timeRemaining);
Spannable timeText = new SpannableString(" "+timeRemaining);
timeText.setSpan(new ForegroundColorSpan(redColor), 0, timeText.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
resendRequest.append(timeText);
@ -292,20 +292,6 @@ public class TransactionPasswordPromptActivity extends BaseActivity implements S
}
private String getDecryptedDataFromIntent(Intent intent) {
if (intent == null)
return "";
String cipherData = intent.getStringExtra(TransKeyActivity.mTK_PARAM_CIPHER_DATA);
byte[] secureKey = intent.getByteArrayExtra(TransKeyActivity.mTK_PARAM_SECURE_KEY);
int iRealDataLength = intent.getIntExtra(TransKeyActivity.mTK_PARAM_DATA_LENGTH, 0);
Log.d("EncryptedData", cipherData);
return EncryptionManager.decryptCipherText(cipherData, secureKey, iRealDataLength);
}
@Override
public void input(int i) {

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

@ -444,7 +444,7 @@
<string name="language_text">Language</string>
<string name="resend_money_text">Resend</string>
<string name="resend_money_text">Resend Money</string>
<string name="support_description_text">We are always there to help you.</string>
<string name="your_request_text">Your request here</string>
<string name="request_for_cancellation_text">Request for cancellation</string>
@ -457,6 +457,7 @@
<string name="subject_text">Subject</string>
<string name="account_no_validation_error_text">Invalid account number (Only numbers and alphabets allowed)</string>
<string name="resend_search_hint_text">GME No / Receiver Name / Bank Name</string>
<string name="resend_code_text">Try again in </string>
</resources>
Loading…
Cancel
Save