Browse Source

splash screen select language and EditText Input validation fixes

new_design
Santosh Bhandary 4 years ago
parent
commit
923d571f5d
  1. 13
      app/src/main/java/com/swifttech/remit/android/common/customwidgets/exchangecountrylistingdialog/CountryFlagMapper.java
  2. 11
      app/src/main/java/com/swifttech/remit/android/common/view/MTextInputEditText.java
  3. 9
      app/src/main/java/com/swifttech/remit/android/features/sendmoney/view/SendMoneyV2TransactionCompleteActivity.java
  4. 1
      app/src/main/java/com/swifttech/remit/android/features/splashscreen/presenter/SplashScreenPresenter.java
  5. 1
      app/src/main/java/com/swifttech/remit/android/features/splashscreen/presenter/SplashScreenPresenterInterface.java
  6. 5
      app/src/main/java/com/swifttech/remit/android/features/splashscreen/view/SplashScreen.java
  7. 19
      app/src/main/res/drawable/ic_transaction_sucess.xml
  8. 2
      app/src/main/res/layout/activity_register_v2.xml
  9. 151
      app/src/main/res/layout/activity_send_money_v2_transaction_complete.xml
  10. 1
      app/src/main/res/layout/fragment_kyc_customer_detail.xml
  11. 8
      app/src/main/res/values/strings.xml

13
app/src/main/java/com/swifttech/remit/android/common/customwidgets/exchangecountrylistingdialog/CountryFlagMapper.java

@ -1,6 +1,9 @@
package com.swifttech.remit.android.common.customwidgets.exchangecountrylistingdialog;
import com.swifttech.remit.android.R;
import com.swifttech.remit.android.features.splashscreen.model.LanguageModel;
import java.util.List;
public class CountryFlagMapper {
@ -230,4 +233,14 @@ public class CountryFlagMapper {
return R.drawable.flag_default;
}
}
public static String getLanguageFromCountryCode(List<LanguageModel> languagemodels,String LanguageCode){
for (LanguageModel languageModel : languagemodels){
if(languageModel.getCountryCode().equalsIgnoreCase(LanguageCode)){
return languageModel.getCountryName();
}
}
return "";
}
}

11
app/src/main/java/com/swifttech/remit/android/common/view/MTextInputEditText.java

@ -3,8 +3,8 @@ package com.swifttech.remit.android.common.view;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.TypedArray;
import android.text.InputFilter;
import android.util.AttributeSet;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
@ -12,11 +12,11 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.material.textfield.TextInputEditText;
import com.swifttech.remit.android.R;
import com.swifttech.remit.android.common.customwidgets.FontCache;
import com.google.android.material.textfield.TextInputEditText;
import com.swifttech.remit.android.common.customwidgets.GmeEditText;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@ -51,8 +51,7 @@ public class MTextInputEditText extends TextInputEditText {
if (customImeNextOptionMethodString != null && customImeNextOptionMethodString.length() > 0) {
setOnEditorActionListener(new DeclaredSoftKeyboardOnImeOptionNextClickListener(this, customImeNextOptionMethodString));
}
setFilters(new InputFilter[]{new GmeEditText.RegExInputFilter("^[a-zA-Z0-9]+$"), new InputFilter.LengthFilter(50)});
}
private static class DeclaredSoftKeyboardOnImeOptionNextClickListener implements OnEditorActionListener {
@ -98,8 +97,6 @@ public class MTextInputEditText extends TextInputEditText {
throw new IllegalStateException("Could not find method " + mMethodName
+ "() in a parent or ancestor Context for android:onImeOptionNext "
+ "attribute defined on view " + mHostView.getClass() + idText);
}
@Override

9
app/src/main/java/com/swifttech/remit/android/features/sendmoney/view/SendMoneyV2TransactionCompleteActivity.java

@ -74,8 +74,6 @@ public class SendMoneyV2TransactionCompleteActivity extends BaseActivity impleme
TextView tv_acc_no;
@BindView(R.id.account_no_container)
ViewGroup account_no_container;
@BindView(R.id.account_no_container_divider)
View account_no_container_divider;
@BindView(R.id.btn_submit)
Button btnSubmit;
@BindView(R.id.btn_cancel)
@ -95,7 +93,7 @@ public class SendMoneyV2TransactionCompleteActivity extends BaseActivity impleme
@BindView(R.id.txt_partner_info)
TextView txt_partner_info;
@BindView(R.id.tv_note)
TextView txt_note;
TextView txv_note;
@BindView(R.id.img_partner_info)
ImageView img_partner_info;
@BindView(R.id.progressbar_partner_info)
@ -187,7 +185,7 @@ public class SendMoneyV2TransactionCompleteActivity extends BaseActivity impleme
String middlName = recieptData.getRMiddleName() == null || recieptData.getRMiddleName().equalsIgnoreCase(" ") ? "" : recieptData.getRMiddleName() + " ";
String name = recieptData.getRFirstName() + " " + middlName + recieptData.getRLastName();
receiverNameTextView.setText(String.format("%s : %s", getString(R.string.to_text), name));
receiverNameTextView.setText(String.format("%s", name));
payoutAmountTextView.setText(recieptData.getPAmount());
if (isRequestedBySendMoney) {
@ -218,7 +216,6 @@ public class SendMoneyV2TransactionCompleteActivity extends BaseActivity impleme
if (accounNo != null && accounNo.length() > 0) {
tv_acc_no.setText(accounNo);
account_no_container.setVisibility(View.VISIBLE);
account_no_container_divider.setVisibility(View.VISIBLE);
}
}
@ -226,7 +223,7 @@ public class SendMoneyV2TransactionCompleteActivity extends BaseActivity impleme
@Override
public void showPartnerInfo(boolean action, String partnerText, String partnerLogoUrl, String note) {
if (note != null && note.length() > 0)
txt_note.setText(note);
txv_note.setText(note);
if (action) {
txt_partner_info.setText(partnerText);

1
app/src/main/java/com/swifttech/remit/android/features/splashscreen/presenter/SplashScreenPresenter.java

@ -66,6 +66,7 @@ public class SplashScreenPresenter extends BasePresenter implements SplashScreen
@Override
public void checkCurrentSelectedLanguage() {
view.updateFlagImage(CountryFlagMapper.getFlagFromCountryCode(this.languageGateway.getPreferredCountryCode()));
view.updateLanguageName(CountryFlagMapper.getLanguageFromCountryCode(this.languageGateway.getRelatedLanguageData(),this.languageGateway.getPreferredCountryCode()));
}
@Override

1
app/src/main/java/com/swifttech/remit/android/features/splashscreen/presenter/SplashScreenPresenterInterface.java

@ -30,6 +30,7 @@ public interface SplashScreenPresenterInterface extends BasePresenterInterface {
Context getContext();
void updateFlagImage(int flagFromCountryCode);
void updateLanguageName(String languageName);
void showAppVersion(String appVersion);

5
app/src/main/java/com/swifttech/remit/android/features/splashscreen/view/SplashScreen.java

@ -357,6 +357,11 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener,
selectedLanguageIcon.setImageResource(flagFromCountryCode);
}
@Override
public void updateLanguageName(String languageName) {
selectedLanguageText.setText(languageName);
}
@Override
public void showAppVersion(String appVersion) {

19
app/src/main/res/drawable/ic_transaction_sucess.xml

@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="52dp"
android:height="52dp"
android:viewportWidth="52"
android:viewportHeight="52">
<path
android:pathData="M26,26m-26,0a26,26 0,1 1,52 0a26,26 0,1 1,-52 0"
android:strokeWidth="2"
android:fillColor="#0c2169"
android:strokeColor="#00000000"/>
<path
android:pathData="M26,26m-25,0a25,25 0,1 1,50 0a25,25 0,1 1,-50 0"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#f4f4f4"/>
<path
android:pathData="M15.216,26.741A1.46,1.46 0,0 1,17.022 24.446l7.362,5.783 10.863,-12.01a1.456,1.456 0,1 1,2.16 1.953L25.698,33.117a1.464,1.464 0,0 1,-2.05 0.245Z"
android:fillColor="#fff"/>
</vector>

2
app/src/main/res/layout/activity_register_v2.xml

@ -152,7 +152,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="@dimen/_20sdp"
android:layout_marginTop="@dimen/_5sdp"
android:layout_gravity="center"
>

151
app/src/main/res/layout/activity_send_money_v2_transaction_complete.xml

@ -19,38 +19,47 @@
android:background="@color/background_gray"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/relativeLayout4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/_5sdp"
android:layout_margin="@dimen/commonPaddingstartEnd"
android:background="@drawable/ic_rounded_background_red_coloured">
<ImageView
android:id="@+id/logo"
android:layout_width="@dimen/_140sdp"
android:layout_height="@dimen/_30sdp"
android:layout_marginTop="@dimen/_14sdp"
android:src="@drawable/ic_logo_white_large"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tintMode="screen" />
android:padding="@dimen/_5sdp">
<ImageView
android:id="@+id/imageView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="66dp"
android:layout_marginTop="92dp"
android:padding="@dimen/_11sdp"
android:src="@drawable/ic_share_image"
android:visibility="gone"
android:visibility="visible"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/llHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="@dimen/_20sdp"
android:gravity="center_horizontal"
app:layout_constraintEnd_toEndOf="parent"
android:background="@drawable/ic_rounded_background_red_coloured"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
>
<ImageView
android:id="@+id/logo"
android:layout_width="@dimen/_140sdp"
android:layout_height="@dimen/_30sdp"
android:layout_marginTop="@dimen/_14sdp"
android:src="@drawable/ic_logo_white_large"
android:visibility="invisible"
app:tintMode="screen" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/transfer_label"
android:layout_width="wrap_content"
@ -61,29 +70,8 @@
android:text="@string/transfer_success_text"
android:textColor="@color/white"
android:textSize="@dimen/_16sdp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/logo"
app:txtfontName="@string/semibold" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/gmeTextView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_6sdp"
android:layout_marginTop="@dimen/_6sdp"
android:layout_marginEnd="@dimen/commonMargin"
android:padding="@dimen/_1sdp"
android:paddingStart="@dimen/_4sdp"
android:paddingEnd="@dimen/_4sdp"
android:text="@string/default_currency_text"
android:textColor="@color/white"
android:textSize="@dimen/_12sdp"
app:layout_constraintEnd_toStartOf="@+id/tv_payout_amount"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_payout_amount" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/tv_payout_amount"
android:layout_width="wrap_content"
@ -92,31 +80,26 @@
android:padding="2dp"
android:textColor="@color/white"
android:textSize="@dimen/_25sdp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/transfer_label"
app:layout_constraintStart_toEndOf="@+id/gmeTextView8"
app:txtfontName="@string/semibold"
tools:text="50000" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/label_send_to"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_6sdp"
android:layout_marginTop="@dimen/commonMargin"
android:layout_marginEnd="@dimen/_6sdp"
android:text="@string/send_to_text"
android:gravity="center_horizontal"
android:padding="@dimen/_1sdp"
android:textColor="@color/white"
android:textSize="@dimen/_12ssp"
android:layout_marginTop="@dimen/_15sdp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_payout_amount"
app:txtfontName="@string/heavy"
tools:text="@string/send_to_text" />
app:txtfontName="@string/regular"
/>
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/tv_receiver_name"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_6sdp"
android:layout_marginEnd="@dimen/_6sdp"
@ -124,13 +107,9 @@
android:padding="@dimen/_1sdp"
android:textColor="@color/white"
android:textSize="@dimen/_16sdp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/label_send_to"
app:txtfontName="@string/heavy"
tools:text="Some name" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/tv_gme_control_no"
android:layout_width="match_parent"
@ -140,22 +119,16 @@
android:padding="@dimen/_1sdp"
android:textColor="@color/white"
android:textSize="@dimen/_12sdp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_receiver_name"
app:txtfontName="@string/heavy"
tools:text="1209389128379128" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/container_partner_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_gme_control_no">
>
<ImageView
android:id="@+id/img_partner_info"
@ -198,7 +171,6 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/tv_note"
android:layout_width="match_parent"
@ -214,13 +186,23 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/container_partner_info" />
/>
</LinearLayout>
<ImageView
android:id="@+id/imgvRightLogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_transaction_sucess"
android:visibility="visible"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/llHeader"
app:layout_constraintBottom_toTopOf="@+id/llHeader"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -250,16 +232,15 @@
android:gravity="end"
android:padding="@dimen/_8sdp"
android:textColor="@color/darkgray"
android:textStyle="bold"
android:textSize="@dimen/_11sdp"
android:textStyle="bold"
app:txtfontName="@string/bold" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="5dp"
android:background="@drawable/bg_dotted"
/>
android:background="@drawable/bg_dotted" />
<LinearLayout
@ -285,8 +266,8 @@
android:gravity="end"
android:padding="@dimen/_8sdp"
android:textColor="@color/darkgray"
android:textStyle="bold"
android:textSize="@dimen/_11sdp"
android:textStyle="bold"
app:txtfontName="@string/semibold" />
</LinearLayout>
@ -313,8 +294,8 @@
android:padding="@dimen/_8sdp"
android:singleLine="true"
android:textColor="@color/darkgray"
android:textStyle="bold"
android:textSize="@dimen/_11sdp"
android:textStyle="bold"
app:txtfontName="@string/semibold" />
</LinearLayout>
@ -341,8 +322,8 @@
android:gravity="end"
android:padding="@dimen/_8sdp"
android:textColor="@color/darkgray"
android:textStyle="bold"
android:textSize="@dimen/_11sdp"
android:textStyle="bold"
app:txtfontName="@string/semibold" />
</LinearLayout>
@ -370,8 +351,8 @@
android:singleLine="false"
android:text=""
android:textColor="@color/darkgray"
android:textStyle="bold"
android:textSize="@dimen/_11sdp"
android:textStyle="bold"
app:txtfontName="@string/semibold" />
</LinearLayout>
@ -401,8 +382,8 @@
android:singleLine="false"
android:text=""
android:textColor="@color/darkgray"
android:textStyle="bold"
android:textSize="@dimen/_11sdp"
android:textStyle="bold"
app:txtfontName="@string/semibold" />
</LinearLayout>
@ -428,13 +409,12 @@
android:padding="@dimen/_8sdp"
android:text=""
android:textColor="@color/darkgray"
android:textStyle="bold"
android:textSize="@dimen/_11sdp"
android:textStyle="bold"
app:txtfontName="@string/semibold" />
</LinearLayout>
<LinearLayout
android:id="@+id/service_fee_layout"
android:layout_width="match_parent"
@ -456,8 +436,8 @@
android:gravity="end"
android:padding="@dimen/_8sdp"
android:textColor="@color/darkgray"
android:textStyle="bold"
android:textSize="@dimen/_11sdp"
android:textStyle="bold"
app:txtfontName="@string/semibold" />
</LinearLayout>
@ -465,8 +445,7 @@
android:id="@+id/coupon_fee_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
>
android:visibility="gone">
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:layout_width="wrap_content"
@ -482,13 +461,13 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:paddingStart="@dimen/_17sdp"
android:paddingTop="@dimen/_8sdp"
android:paddingBottom="@dimen/_8sdp"
android:paddingEnd="@dimen/_8sdp"
android:paddingStart="@dimen/_17sdp"
android:paddingBottom="@dimen/_8sdp"
android:textColor="@color/darkgray"
android:textStyle="bold"
android:textSize="@dimen/_11sdp"
android:textStyle="bold"
app:txtfontName="@string/semibold"
tools:text="Some really really long coupon name for testing the UI. Some really really long coupon name for testing the UI." />
</LinearLayout>
@ -514,8 +493,8 @@
android:gravity="end"
android:padding="@dimen/_8sdp"
android:textColor="@color/darkgray"
android:textStyle="bold"
android:textSize="@dimen/_11sdp"
android:textStyle="bold"
app:txtfontName="@string/semibold" />
</LinearLayout>
@ -540,8 +519,8 @@
android:gravity="end"
android:padding="@dimen/_8sdp"
android:textColor="@color/darkgray"
android:textStyle="bold"
android:textSize="@dimen/_11sdp"
android:textStyle="bold"
app:txtfontName="@string/semibold" />
</LinearLayout>
</LinearLayout>
@ -549,13 +528,13 @@
<com.swifttech.remit.android.common.customwidgets.GmeButton
android:id="@+id/btn_submit"
style="@style/MButton"
android:enabled="true"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:layout_marginStart="@dimen/commonPaddingstartEnd"
android:layout_marginTop="20dp"
android:layout_marginRight="@dimen/commonPaddingstartEnd"
android:layout_marginBottom="30dp"
android:background="@drawable/ic_rounded_background_red_coloured"
android:enabled="true"
android:text="@string/done_text"
android:textAllCaps="false"
android:textColor="@color/white"
@ -574,13 +553,13 @@
<com.swifttech.remit.android.common.customwidgets.GmeButton
android:id="@+id/btn_cancel"
style="@style/MButton"
android:enabled="true"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/commonPaddingstartEnd"
android:layout_marginEnd="@dimen/_5sdp"
android:layout_weight=".5"
android:background="@drawable/ic_rounded_background_red_coloured"
android:enabled="true"
android:inputType="textMultiLine"
android:paddingStart="@dimen/_5sdp"
android:paddingEnd="@dimen/_5sdp"
@ -593,7 +572,6 @@
<com.swifttech.remit.android.common.customwidgets.GmeButton
android:id="@+id/btn_change"
style="@style/MButton"
android:enabled="true"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
@ -601,6 +579,7 @@
android:layout_marginEnd="@dimen/commonPaddingstartEnd"
android:layout_weight=".5"
android:background="@drawable/ic_rounded_background_red_coloured"
android:enabled="true"
android:paddingStart="@dimen/_5sdp"
android:paddingEnd="@dimen/_5sdp"
android:text="@string/request_to_change_text"

1
app/src/main/res/layout/fragment_kyc_customer_detail.xml

@ -52,7 +52,6 @@
style="@style/MTextInputEditText"
android:imeOptions="actionNext"
android:inputType="text"
app:maxLengthLimiter="100" />
</com.swifttech.remit.android.common.view.MTextInputLayout>

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

@ -214,8 +214,8 @@
<string name="transfer_success_text">Transfer Successful!</string>
<string name="transfer_success_info_text">You have successfully transferred your money to </string>
<string name="total_payout_amount_text">Total Payout Amount</string>
<string name="jme_control_no_text">Japan Money Express Control No</string>
<string name="gme_control_security_text">Please keep this Japan Money Express control no. very secure.</string>
<string name="jme_control_no_text">JME Control No</string>
<string name="gme_control_security_text">Please keep this JME control no. very secure.</string>
<string name="share_party_text">Share with concerned party only</string>
<string name="transaction_date_text">Transaction Date</string>
<string name="receiver_text">Receiver</string>
@ -421,11 +421,11 @@ All the configurations are done from backend web application system which allows
<string name="no_subject_error_text">Please write a subject</string>
<string name="no_message_body_text">Please write a message body</string>
<string name="no_control_id_error_text">Japan Money Express Number not found</string>
<string name="no_control_id_error_text">JME Number not found</string>
<string name="no_transaction_id_error_text">No transaction id found</string>
<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">Japan Money Express No / Receiver Name / Bank Name</string>
<string name="resend_search_hint_text">JME No / Receiver Name / Bank Name</string>
<string name="resend_code_text">Try again in </string>
<string name="referral_code_text">Referral Code (Optional)</string>
<string name="fingerprint_auth_text">Fingerprint Authentication</string>

Loading…
Cancel
Save