|
|
@ -1,6 +1,9 @@ |
|
|
|
package com.swifttech.remit.android.features.registerv2.existingcustomer.view; |
|
|
|
|
|
|
|
import android.os.Bundle; |
|
|
|
import android.text.Editable; |
|
|
|
import android.text.Selection; |
|
|
|
import android.text.TextWatcher; |
|
|
|
import android.view.LayoutInflater; |
|
|
|
import android.view.View; |
|
|
|
import android.view.ViewGroup; |
|
|
@ -90,12 +93,36 @@ public class ExistingCustomerRegistrationRequestFragment extends BaseFragment { |
|
|
|
dobSelectionSubject |
|
|
|
) |
|
|
|
); |
|
|
|
|
|
|
|
existingCustomerRegistrationRequestLiveData.getDobInputLiveData().observe(getViewLifecycleOwner(),this::onDOBStateChanged); |
|
|
|
existingCustomerRegistrationRequestLiveData.getMobileNoInputLiveData().observe(getViewLifecycleOwner(),this::onMobileNoStateChanged); |
|
|
|
existingCustomerRegistrationRequestLiveData.getIdNumberInputLiveData().observe(getViewLifecycleOwner(),this::onIdNoStateChanged); |
|
|
|
existingCustomerRegistrationRequestLiveData.getAllFormValidLiveData().observe(getViewLifecycleOwner(),this::onAllFieldValid); |
|
|
|
|
|
|
|
mobile_edTxt.setText("+81"); |
|
|
|
mobile_edTxt.addTextChangedListener(new TextWatcher() { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void onTextChanged(CharSequence s, int start, int before, int count) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void beforeTextChanged(CharSequence s, int start, int count, |
|
|
|
int after) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void afterTextChanged(Editable s) { |
|
|
|
if(!s.toString().startsWith("+81")){ |
|
|
|
mobile_edTxt.setText("+81"); |
|
|
|
Selection.setSelection(mobile_edTxt.getText(), mobile_edTxt.getText().length()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private void onAllFieldValid(FormInputStateDTO formInputStateDTO) { |
|
|
|