[Question] Is there is a way to get input only when the blockField is filled with number of blocks?
DasserBasyouni opened this issue ยท 5 comments
DasserBasyouni commented
In more explanation, I'm wondering about if there is a listener that listens to inputs only when it fills the whole field, so if bet_numberOfBlock="6" then it will only be notified when 6 strings/ints and in the field.
thank you for your great work
shiburagi commented
amexEditText.setTextChangedListener(TextWatcher watcher)
I think you can use above method. And below the example.
amexEditText.setTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
if(amexEditText.getText().length()==6){
// do something here
}
}
});
DasserBasyouni commented
thank you, I didn't find it when I was searching in the library
shiburagi commented
you're welcome
shiburagi commented
btw, i already publish new version, implementation 'com.infideap.blockedittext:block-edittext:0.0.7'
fix some issue with text listener, and u can find the example here,
DasserBasyouni commented
thank you so much