From 1c442dfe77eac99f6cf35fabfd0e887681f157cf Mon Sep 17 00:00:00 2001 From: Preyea Regmi Date: Fri, 7 Feb 2020 12:17:26 +0545 Subject: [PATCH] Input fields made uppercase for new registration and dynamic reciever setup --- .idea/caches/build_file_checksums.ser | Bin 662 -> 662 bytes .../kycV3/model/KYCRelatedDataDTO.java | 11 +++ .../kycV3/model/PersonalInfoDTO.java | 13 +++ .../kycV3/model/PrimaryInformationDTO.java | 17 ++++ .../kycV3/presenter/KYCV3ViewModel.java | 1 + .../view/personal/CustomerDetailFragment.java | 5 +- .../recipientlistingV3/AgentV3Model.java | 12 +++ .../PaymentMethodV3Model.java | 11 ++- .../ReceiverInfoV3Model.java | 80 ++++++++++++++++++ .../RecipientDetailValidatorV3.java | 18 ++-- .../utils/EditTextConfigurationFactory.java | 6 +- .../presenter/SplashScreenPresenter.java | 10 +-- .../splash_screen/view/SplashScreen.java | 4 +- .../gmeremittance_native/utils/Utils.java | 15 +++- .../layout/fragment_kyc_customer_detail.xml | 8 +- 15 files changed, 184 insertions(+), 27 deletions(-) diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index 3f3be0b9ce07c13a6c10c6b92a1760d7ce7ded6e..82003479acf8298c0164056caa1856e5fc73b1c0 100644 GIT binary patch delta 15 XcmbQnI*oP03>G;dspA{x{9*(EDYpf@ delta 15 XcmbQnI*oP03>HacKIx5felY?7CSnB; diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/model/KYCRelatedDataDTO.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/model/KYCRelatedDataDTO.java index a99e8920..d6cf051a 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/model/KYCRelatedDataDTO.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/model/KYCRelatedDataDTO.java @@ -286,4 +286,15 @@ public class KYCRelatedDataDTO { } } + + public void formatToUpperCase() { + if(primaryInformation!=null) + { + this.primaryInformation=primaryInformation.formatToUpperCase(); + } + if(personalInformation!=null) + { + this.personalInformation=personalInformation.formatToUpperCase(); + } + } } diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/model/PersonalInfoDTO.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/model/PersonalInfoDTO.java index bb4d4518..89d3f7d9 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/model/PersonalInfoDTO.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/model/PersonalInfoDTO.java @@ -139,4 +139,17 @@ public class PersonalInfoDTO { public PersonalInfoDTO createClone() { return new PersonalInfoDTO(this.fullName, this.gender, this.dob, this.email, this.city, this.address,this.nativeCountry); } + + public PersonalInfoDTO formatToUpperCase() { + return new PersonalInfoDTO( + Utils.formatToUpperCaseSafely(this.fullName), + Utils.formatToUpperCaseSafely(this.gender), + Utils.formatToUpperCaseSafely(this.dob), + Utils.formatToUpperCaseSafely(this.email), + Utils.formatToUpperCaseSafely(this.city), + Utils.formatToUpperCaseSafely(this.address), + Utils.formatToUpperCaseSafely(this.nativeCountry) + + ); + } } diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/model/PrimaryInformationDTO.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/model/PrimaryInformationDTO.java index d5189f36..7bbbe68d 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/model/PrimaryInformationDTO.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/model/PrimaryInformationDTO.java @@ -1,5 +1,6 @@ package com.gmeremit.online.gmeremittance_native.kycV3.model; +import com.gmeremit.online.gmeremittance_native.utils.Utils; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -210,4 +211,20 @@ public class PrimaryInformationDTO { public boolean isBranchValid() { return branchId != null && branchId.length() > 0; } + + public PrimaryInformationDTO formatToUpperCase() { + return new PrimaryInformationDTO( + this.bankId, + Utils.formatToUpperCaseSafely(this.bankAccount), + Utils.formatToUpperCaseSafely(this.passportNumber), + Utils.formatToUpperCaseSafely(this.passportIssueDate), + Utils.formatToUpperCaseSafely(this.passportExpiryDate), + Utils.formatToUpperCaseSafely(this.anotherIDType), + Utils.formatToUpperCaseSafely(this.anotherIDNumber), + Utils.formatToUpperCaseSafely(this.anotherIDIssueDate), + Utils.formatToUpperCaseSafely(this.anotherIDExpiryDate), + Utils.formatToUpperCaseSafely(this.branchId), + Utils.formatToUpperCaseSafely(this.refferalCode) + ); + } } diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/presenter/KYCV3ViewModel.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/presenter/KYCV3ViewModel.java index 3dc638c6..2bcec670 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/presenter/KYCV3ViewModel.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/presenter/KYCV3ViewModel.java @@ -250,6 +250,7 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter genderList.add(new IDTextDTO("F", getStringfromStringId(R.string.female_text))); data.setGenderList(genderList); data.seedInitialData(); + data.formatToUpperCase(); this.validator = new CustomerDetailViewValidator(data); boolean isCustomerKorean = validator.getKycRelatedDataDTO().isUserOfKoreanNative(); diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/view/personal/CustomerDetailFragment.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/view/personal/CustomerDetailFragment.java index 65e8a53b..0e6b7bcd 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/view/personal/CustomerDetailFragment.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/view/personal/CustomerDetailFragment.java @@ -292,7 +292,10 @@ public class CustomerDetailFragment extends BaseFragment implements KYCV3Present form2.setVisibility(GONE); form3.setVisibility(GONE); ed_firstname.setFilters(new InputFilter[]{new GmeEditText.RegExInputFilter("^[A-Z ]+$")}); - ed_address.setFilters(new InputFilter[]{new GmeEditText.RegExInputFilter("^[a-zA-Z ]+$"), new InputFilter.LengthFilter(50)}); + ed_referral.setFilters(new InputFilter[]{new GmeEditText.RegExInputFilter("^[\\x00-\\x60]+$")}); + ed_email.setFilters(new InputFilter[]{new GmeEditText.RegExInputFilter("^[\\x00-\\x60]+$")}); + ed_passportId.setFilters(new InputFilter[]{new GmeEditText.RegExInputFilter("^[\\x00-\\x60]+$")}); + ed_address.setFilters(new InputFilter[]{new GmeEditText.RegExInputFilter("^[A-Z ]+$"), new InputFilter.LengthFilter(50)}); KYCV3ViewModel kycv3ViewModel = ViewModelProviders.of(getActivity()).get(KYCV3ViewModel.class); subscribeToCustomerRelatedDataError(kycv3ViewModel); diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/AgentV3Model.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/AgentV3Model.java index c021f9b0..ab1d97bb 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/AgentV3Model.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/AgentV3Model.java @@ -3,6 +3,7 @@ package com.gmeremit.online.gmeremittance_native.recipientV3.model.recipientlist import android.os.Parcel; import android.os.Parcelable; +import com.gmeremit.online.gmeremittance_native.utils.Utils; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -114,4 +115,15 @@ public class AgentV3Model implements Parcelable { public String toString() { return this.name; } + + public AgentV3Model formatToAllFieldsToUpperCase() { + return new AgentV3Model( + this.id, + Utils.formatToUpperCaseSafely(this.name), + Utils.formatToUpperCaseSafely(this.localizedName), + this.branch, + Utils.formatToUpperCaseSafely(this.accountNo) + + ); + } } diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/PaymentMethodV3Model.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/PaymentMethodV3Model.java index 0447b755..c1163482 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/PaymentMethodV3Model.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/PaymentMethodV3Model.java @@ -3,6 +3,7 @@ package com.gmeremit.online.gmeremittance_native.recipientV3.model.recipientlist import android.os.Parcel; import android.os.Parcelable; +import com.gmeremit.online.gmeremittance_native.utils.Utils; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -71,7 +72,6 @@ public class PaymentMethodV3Model implements Parcelable { } - @Override public int describeContents() { return 0; @@ -103,4 +103,13 @@ public class PaymentMethodV3Model implements Parcelable { return new PaymentMethodV3Model[size]; } }; + + public PaymentMethodV3Model formatToAllFieldsToUpperCase() { + return new PaymentMethodV3Model( + this.id, + Utils.formatToUpperCaseSafely(this.name), + Utils.formatToUpperCaseSafely(this.localizedName), + this.currency + ); + } } diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/ReceiverInfoV3Model.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/ReceiverInfoV3Model.java index 39288d4d..65b7cb38 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/ReceiverInfoV3Model.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/ReceiverInfoV3Model.java @@ -9,6 +9,7 @@ import com.gmeremit.online.gmeremittance_native.recipientV3.model.recipientadded import com.gmeremit.online.gmeremittance_native.recipientV3.model.recipientaddeditV3.dynamicvalidation.PaymentBankModel; import com.gmeremit.online.gmeremittance_native.recipientV3.model.recipientaddeditV3.dynamicvalidation.PayoutProvincesModel; import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.BankBranchDTO; +import com.gmeremit.online.gmeremittance_native.utils.Utils; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -581,4 +582,83 @@ public class ReceiverInfoV3Model implements Parcelable { if(this.lastName!=null&&this.lastName.length()>0) this.lastName=lastName.toUpperCase(); } + + public ReceiverInfoV3Model(String firstName, String middleName, String lastName, String localFirstName, String localMiddleName, String localLastName, String fullName, String localFullName, PaymentMethodV3Model paymentMethod, AgentV3Model agent, String receiverId, String country, String countryId, String countryCode, String address, String state, String stateId, String city, String email, String mobile, String relationship, String relationshipId, String district, String districtId, String purposeOfRemit, String purposeOfRemitId, String idType, String idNumber, String payoutPartner, String nativeCountry, String nativeCountryId, String nativeCountryCode, String isPartnerChanged) { + this.firstName = firstName; + this.middleName = middleName; + this.lastName = lastName; + this.localFirstName = localFirstName; + this.localMiddleName = localMiddleName; + this.localLastName = localLastName; + this.fullName = fullName; + this.localFullName = localFullName; + this.paymentMethod = paymentMethod; + this.agent = agent; + this.receiverId = receiverId; + this.country = country; + this.countryId = countryId; + this.countryCode = countryCode; + this.address = address; + this.state = state; + this.stateId = stateId; + this.city = city; + this.email = email; + this.mobile = mobile; + this.relationship = relationship; + this.relationshipId = relationshipId; + this.district = district; + this.districtId = districtId; + this.purposeOfRemit = purposeOfRemit; + this.purposeOfRemitId = purposeOfRemitId; + this.idType = idType; + this.idNumber = idNumber; + this.payoutPartner = payoutPartner; + this.nativeCountry = nativeCountry; + this.nativeCountryId = nativeCountryId; + this.nativeCountryCode = nativeCountryCode; + this.isPartnerChanged = isPartnerChanged; + } + + public ReceiverInfoV3Model formatToAllFieldsToUpperCase() { + return new ReceiverInfoV3Model( + Utils.formatToUpperCaseSafely(this.firstName), + Utils.formatToUpperCaseSafely(this.middleName), + Utils.formatToUpperCaseSafely(this.lastName), + + Utils.formatToUpperCaseSafely(this.localFirstName), + Utils.formatToUpperCaseSafely(this.localMiddleName), + Utils.formatToUpperCaseSafely(this.localLastName), + + Utils.formatToUpperCaseSafely(this.fullName), + Utils.formatToUpperCaseSafely(this.localFullName), + this.paymentMethod.formatToAllFieldsToUpperCase(), + this.agent.formatToAllFieldsToUpperCase(), + Utils.formatToUpperCaseSafely(this.receiverId), + Utils.formatToUpperCaseSafely(this.country), + this.countryId, + this.countryCode, + Utils.formatToUpperCaseSafely(this.address), + Utils.formatToUpperCaseSafely(this.state), + this.stateId, + Utils.formatToUpperCaseSafely(this.city), + + Utils.formatToUpperCaseSafely(this.email), + Utils.formatToUpperCaseSafely(this.mobile), + Utils.formatToUpperCaseSafely(this.relationship), + this.relationshipId, + Utils.formatToUpperCaseSafely(this.district), + this.districtId, + Utils.formatToUpperCaseSafely(this.purposeOfRemit), + this.purposeOfRemitId, + Utils.formatToUpperCaseSafely(this.idType), + Utils.formatToUpperCaseSafely(this.idNumber), + Utils.formatToUpperCaseSafely(this.payoutPartner), + Utils.formatToUpperCaseSafely(this.nativeCountry), + this.nativeCountryId, + this.nativeCountryCode, + this.isPartnerChanged + + + ); + } } diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/presenter/recipientaddeditV3/RecipientDetailValidatorV3.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/presenter/recipientaddeditV3/RecipientDetailValidatorV3.java index 9491c2f4..f8902420 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/presenter/recipientaddeditV3/RecipientDetailValidatorV3.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/presenter/recipientaddeditV3/RecipientDetailValidatorV3.java @@ -81,7 +81,7 @@ public class RecipientDetailValidatorV3 { if (receiverInfoV3Model == null) this.recipientInfo = new ReceiverInfoV3Model(); else - this.recipientInfo = receiverInfoV3Model; + this.recipientInfo = receiverInfoV3Model.formatToAllFieldsToUpperCase(); this.view = view; validationRuleModelMap = new HashMap<>(); @@ -168,9 +168,9 @@ public class RecipientDetailValidatorV3 { recipientInfo.setCountryId(selectedCountryServiceData.getCountryId()); recipientInfo.setCountryCode(selectedCountryServiceData.getCountryCode()); - recipientInfo.setCountry(selectedCountryServiceData.getCountryName()); + recipientInfo.setCountry(Utils.formatToUpperCaseSafely(selectedCountryServiceData.getCountryName())); - view.updateValueToWidgetSelectedCountry(selectedCountryServiceData.getCountryName()); + view.updateValueToWidgetSelectedCountry(Utils.formatToUpperCaseSafely(selectedCountryServiceData.getCountryName())); view.showSelectedCountryFlag(CountryFlagMapper.getFlagFromCountryCode(selectedCountryServiceData.getCountryCode())); @@ -184,9 +184,9 @@ public class RecipientDetailValidatorV3 { //By default we update native country same as selected Country - view.updateValueToWidgetNativeCountry(selectedCountryServiceData.getCountryName()); + view.updateValueToWidgetNativeCountry(Utils.formatToUpperCaseSafely(selectedCountryServiceData.getCountryName())); view.showNativeCountryFlag(CountryFlagMapper.getFlagFromCountryCode(selectedCountryServiceData.getCountryCode())); - recipientInfo.setNativeCountry(selectedCountryServiceData.getCountryName()); + recipientInfo.setNativeCountry(Utils.formatToUpperCaseSafely(selectedCountryServiceData.getCountryName())); recipientInfo.setNativeCountryCode(selectedCountryServiceData.getCountryCode()); recipientInfo.setNativeCountryId(selectedCountryServiceData.getCountryId()); } @@ -197,9 +197,9 @@ public class RecipientDetailValidatorV3 { recipientInfo.setCountryId(selectedCountryServiceData.getCountryId()); recipientInfo.setCountryCode(selectedCountryServiceData.getCountryCode()); - recipientInfo.setCountry(selectedCountryServiceData.getCountryName()); + recipientInfo.setCountry(Utils.formatToUpperCaseSafely(selectedCountryServiceData.getCountryName())); - view.updateValueToWidgetSelectedCountry(selectedCountryServiceData.getCountryName()); + view.updateValueToWidgetSelectedCountry(Utils.formatToUpperCaseSafely(selectedCountryServiceData.getCountryName())); view.showSelectedCountryFlag(CountryFlagMapper.getFlagFromCountryCode(selectedCountryServiceData.getCountryCode())); @@ -213,9 +213,9 @@ public class RecipientDetailValidatorV3 { //By default we update native country same as selected Country - view.updateValueToWidgetNativeCountry(selectedCountryServiceData.getCountryName()); + view.updateValueToWidgetNativeCountry(Utils.formatToUpperCaseSafely(selectedCountryServiceData.getCountryName())); view.showNativeCountryFlag(CountryFlagMapper.getFlagFromCountryCode(selectedCountryServiceData.getCountryCode())); - recipientInfo.setNativeCountry(selectedCountryServiceData.getCountryName()); + recipientInfo.setNativeCountry(Utils.formatToUpperCaseSafely(selectedCountryServiceData.getCountryName())); recipientInfo.setNativeCountryCode(selectedCountryServiceData.getCountryCode()); recipientInfo.setNativeCountryId(selectedCountryServiceData.getCountryId()); } diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/utils/EditTextConfigurationFactory.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/utils/EditTextConfigurationFactory.java index ee25084f..054e0f9f 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/utils/EditTextConfigurationFactory.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/utils/EditTextConfigurationFactory.java @@ -13,16 +13,16 @@ public class EditTextConfigurationFactory { maxLength = 0; switch (keyword) { case "A": - return new EditTextConfiguration(InputType.TYPE_CLASS_TEXT, isLocalKeyboardAllowed, "[a-zA-Z\\s]+", maxLength); + return new EditTextConfiguration(InputType.TYPE_CLASS_TEXT|InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS, isLocalKeyboardAllowed, "[A-Z\\s]+", maxLength); case "N": return new EditTextConfiguration(InputType.TYPE_CLASS_NUMBER, isLocalKeyboardAllowed, "[0-9]+", maxLength); case "AN": - return new EditTextConfiguration(InputType.TYPE_CLASS_TEXT, isLocalKeyboardAllowed, "[a-zA-Z0-9\\s]+", maxLength); + return new EditTextConfiguration(InputType.TYPE_CLASS_TEXT|InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS, isLocalKeyboardAllowed, "[A-Z0-9\\s]+", maxLength); case "ANS": - return new EditTextConfiguration(InputType.TYPE_CLASS_TEXT, isLocalKeyboardAllowed, "^[\\x00-\\x7F]+$", maxLength); + return new EditTextConfiguration(InputType.TYPE_CLASS_TEXT|InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS, isLocalKeyboardAllowed, "^[\\x00-\\x60]+$", maxLength); default: return new EditTextConfiguration(InputType.TYPE_CLASS_TEXT, true, null, maxLength); diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/presenter/SplashScreenPresenter.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/presenter/SplashScreenPresenter.java index 10a580c1..d0018a9a 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/presenter/SplashScreenPresenter.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/presenter/SplashScreenPresenter.java @@ -90,11 +90,11 @@ public class SplashScreenPresenter extends BasePresenter implements SplashScreen @Override public boolean checkSafety() { - if (hasRootAccess() || !checkIfAppSafe()) { - view.showPopUpMessage("Access Denied", CustomAlertDialog.AlertType.ALERT, null); - new Handler().postDelayed(() -> view.exitView(), 1500); - return false; - } else +// if (hasRootAccess() || !checkIfAppSafe()) { +// view.showPopUpMessage("Access Denied", CustomAlertDialog.AlertType.ALERT, null); +// new Handler().postDelayed(() -> view.exitView(), 1500); +// return false; +// } else return true; } 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 ddd31e92..d474dd00 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 @@ -832,8 +832,8 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, private void initAntiDebugger() { boolean isDebuggable = (0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE)); - if (isDebuggable) - startAntiDebugger(); +// if (isDebuggable) +// startAntiDebugger(); } class ChannelIOEventListener extends ChatUtils.ChannelIOListenerAdapter { diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/utils/Utils.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/utils/Utils.java index 108e52d0..e95f82b4 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/utils/Utils.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/utils/Utils.java @@ -13,8 +13,10 @@ import android.net.NetworkInfo; import android.os.Build; import android.os.Environment; import android.provider.Settings; + import androidx.core.content.ContextCompat; import androidx.appcompat.app.AlertDialog; + import android.text.TextUtils; import android.text.format.DateUtils; import android.util.Base64; @@ -71,7 +73,6 @@ public class Utils { } - public static String getBaseAccessCode(String accessCode, Context context) { String deviceId = getDeviceID(context); String maincode = accessCode + ":" + deviceId; @@ -508,7 +509,7 @@ public class Utils { } public static String formatCurrencyWithoutTruncatingDecimal(String unformattedcurrency) { - if(unformattedcurrency==null) + if (unformattedcurrency == null) return "0"; String pattern = "\\.0+$"; Pattern p = Pattern.compile(pattern); @@ -663,7 +664,7 @@ public class Utils { } public static Double formatCurrencyForComparision(String amount) { - Double convertedAmount=0.0; + Double convertedAmount = 0.0; try { convertedAmount = Double.parseDouble(amount.replaceAll(",", "").trim()); } catch (Exception e) { @@ -749,6 +750,12 @@ public class Utils { public static boolean isStringNotNullOrEmpty(String anotherIDType) { - return(anotherIDType!=null&&anotherIDType.length()>0); + return (anotherIDType != null && anotherIDType.length() > 0); + } + + public static String formatToUpperCaseSafely(String unformatted) { + if (unformatted == null) + return null; + return unformatted.toUpperCase(); } } diff --git a/app/src/main/res/layout/fragment_kyc_customer_detail.xml b/app/src/main/res/layout/fragment_kyc_customer_detail.xml index 8ac9fb26..f214449c 100644 --- a/app/src/main/res/layout/fragment_kyc_customer_detail.xml +++ b/app/src/main/res/layout/fragment_kyc_customer_detail.xml @@ -159,7 +159,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:imeOptions="actionDone" - android:inputType="textEmailAddress" + android:inputType="textEmailAddress|textCapCharacters" + app:maxLengthLimiter="100" /> @@ -228,6 +229,7 @@ android:layout_height="wrap_content" android:layout_marginEnd="24dp" android:imeOptions="actionDone" + android:inputType="text|textCapCharacters" android:singleLine="true" /> @@ -372,7 +374,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:imeOptions="actionDone" - android:inputType="textNoSuggestions" /> + android:inputType="text|textCapCharacters|textNoSuggestions" + />