Browse Source

Domestic send validation fixes

master
Preyea Regmi 5 years ago
parent
commit
9490e087f1
  1. 34
      app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/send/presenter/DomesticRemitPresenterImpl.java
  2. 8
      app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/send/view/DomesticRemitActivity.java
  3. 51
      app/src/main/res/layout/activity_domestic_remit.xml

34
app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/send/presenter/DomesticRemitPresenterImpl.java

@ -2,6 +2,7 @@ package com.gmeremit.online.gmeremittance_native.domesticremit.send.presenter;
import android.util.Log; import android.util.Log;
import com.gmeremit.online.gmeremittance_native.R;
import com.gmeremit.online.gmeremittance_native.base.BasePresenter; import com.gmeremit.online.gmeremittance_native.base.BasePresenter;
import com.gmeremit.online.gmeremittance_native.customwidgets.banklistingdialog.BankIconMapper; import com.gmeremit.online.gmeremittance_native.customwidgets.banklistingdialog.BankIconMapper;
import com.gmeremit.online.gmeremittance_native.customwidgets.common.GenericPromptDialog; import com.gmeremit.online.gmeremittance_native.customwidgets.common.GenericPromptDialog;
@ -30,6 +31,23 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
countDownRemainingValue = -1; countDownRemainingValue = -1;
} }
@Override
public void getDomesticRemitRelatedInfo() {
mockDomesticRemitRelatedData();
}
private void mockDomesticRemitRelatedData() {
String serviceCharge=gateway.getMockedDomesticRelatedData(view.getContext()).getServiceFee();
domesticRemitDataValidator.setServiceCharge(serviceCharge);
String messageServiceCharge= "Service charge: "+serviceCharge;
view.updateServiceCharge(messageServiceCharge);
}
@Override @Override
public void updateRemainingCountDownValue(long value) { public void updateRemainingCountDownValue(long value) {
this.countDownRemainingValue = value; this.countDownRemainingValue = value;
@ -64,8 +82,7 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
} }
private void performSendMoneyTransaction(String password, boolean isBioMetricUsed) { private void performSendMoneyTransaction(String password, boolean isBioMetricUsed) {
Log.d(this.getClass().getSimpleName(),password);
Log.d(this.getClass().getSimpleName(),isBioMetricUsed+"");
} }
@ -186,19 +203,6 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
domesticRemitDataValidator.validateAll(); domesticRemitDataValidator.validateAll();
} }
@Override
public void getDomesticRemitRelatedInfo() {
mockDomesticRemitRelatedData();
}
private void mockDomesticRemitRelatedData() {
String servicCharge=gateway.getMockedDomesticRelatedData(view.getContext()).getServiceFee();
domesticRemitDataValidator.setServiceCharge(servicCharge);
view.updateServiceCharge(servicCharge);
}
class DomesticRemitDataValidator { class DomesticRemitDataValidator {

8
app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/send/view/DomesticRemitActivity.java

@ -91,8 +91,8 @@ public class DomesticRemitActivity extends BaseActivity implements DomesticRemit
GMEFormInputField recipientMobileNoFormInputField; GMEFormInputField recipientMobileNoFormInputField;
@BindView(R.id.serviceChargeFormInputField)
GMEFormInputField serviceChargeFormInputField;
@BindView(R.id.serviceChargeTxtView)
TextView serviceChargeFormInputField;
@BindView(R.id.recipientHistoryImageView) @BindView(R.id.recipientHistoryImageView)
ImageView recipientHistoryImageView; ImageView recipientHistoryImageView;
@ -162,7 +162,6 @@ public class DomesticRemitActivity extends BaseActivity implements DomesticRemit
senderBankSelectionFormInputField.getEditTextView().setFilters(new InputFilter[]{}); senderBankSelectionFormInputField.getEditTextView().setFilters(new InputFilter[]{});
recipientBankSelectionFormInputField.getEditTextView().setFilters(new InputFilter[]{}); recipientBankSelectionFormInputField.getEditTextView().setFilters(new InputFilter[]{});
recipientFullNameFormInputField.getEditTextView().setEnabled(false); recipientFullNameFormInputField.getEditTextView().setEnabled(false);
serviceChargeFormInputField.getEditTextView().setEnabled(false);
} }
private void initListeners() { private void initListeners() {
@ -401,7 +400,8 @@ public class DomesticRemitActivity extends BaseActivity implements DomesticRemit
@Override @Override
public void updateServiceCharge(String serviceFee) { public void updateServiceCharge(String serviceFee) {
serviceChargeFormInputField.getEditTextView().setText(serviceFee);
serviceChargeFormInputField.setVisibility(View.VISIBLE);
serviceChargeFormInputField.setText(serviceFee);
} }

51
app/src/main/res/layout/activity_domestic_remit.xml

@ -64,19 +64,19 @@
android:paddingEnd="@dimen/_8sdp" android:paddingEnd="@dimen/_8sdp"
android:paddingTop="@dimen/_3sdp" android:paddingTop="@dimen/_3sdp"
android:paddingBottom="@dimen/_3sdp" android:paddingBottom="@dimen/_3sdp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_marginTop="@dimen/_5sdp"
android:layout_marginBottom="@dimen/_5sdp"
android:id="@+id/currentBalanceTextView" android:id="@+id/currentBalanceTextView"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:gravity="right|center_vertical"
android:text="NA"
android:textColor="@color/colorPrimaryDark"
android:text="@string/na_text"
android:textColor="@color/dark_gray"
app:txtfontName="@string/semibold"
android:textSize="17sp" android:textSize="17sp"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@+id/serviceChargeTxtView"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_chainStyle="packed" app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -87,25 +87,46 @@
android:paddingEnd="@dimen/_8sdp" android:paddingEnd="@dimen/_8sdp"
android:paddingTop="@dimen/_3sdp" android:paddingTop="@dimen/_3sdp"
android:paddingBottom="@dimen/_3sdp" android:paddingBottom="@dimen/_3sdp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_marginTop="@dimen/_5sdp"
android:layout_marginBottom="@dimen/_5sdp"
android:id="@+id/checkBalanceTxt" android:id="@+id/checkBalanceTxt"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:background="@drawable/ic_rounded_country_listing_gray" android:background="@drawable/ic_rounded_country_listing_gray"
android:gravity="right|center_vertical"
android:text="Check Balance" android:text="Check Balance"
android:textColor="@color/colorPrimaryDark" android:textColor="@color/colorPrimaryDark"
android:textSize="17sp" android:textSize="17sp"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@+id/serviceChargeTxtView"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_chainStyle="packed" app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/senderBankSelectionViewContainer" /> app:layout_constraintTop_toBottomOf="@+id/senderBankSelectionViewContainer" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:paddingStart="@dimen/_8sdp"
android:paddingEnd="@dimen/_8sdp"
android:paddingTop="@dimen/_3sdp"
android:paddingBottom="@dimen/_3sdp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:id="@+id/serviceChargeTxtView"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:gravity="right|center_vertical"
android:text="Service Charge "
android:textColor="@color/colorPrimaryDark"
android:textSize="17sp"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
@ -221,15 +242,7 @@
<com.gmeremit.online.gmeremittance_native.customwidgets.GMEFormInputField
android:layout_marginStart="10dp"
android:id="@+id/serviceChargeFormInputField"
style="@style/gme_form_text_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:visibility="visible"
android:hint="Service Charge (KRW)" />
<Button <Button
android:id="@+id/btn_ok" android:id="@+id/btn_ok"

Loading…
Cancel
Save