I have edittext and I want to understand stop and start typing. I listened textwatcher onTextChanged and I use timer for typing.
But when edittext's text is not empty, I don't understand correctly actual typing operation.
I want to see:
My edittext text:
--ad-- --> typing...
--ads-- --> typing...
--ads-- --> after 900 ms stop typing . ::: but not understand
TextWatcher textWatcher = new TextWatcher() {
public void afterTextChanged(Editable s) {
}
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
public void onTextChanged(CharSequence s, int start, final int before, final int count) {
if (count != 0 && count >= before) {
typingTimer.startTyping();
return;
}
typingTimer.stopTyping();
}
};