中設置文本後滯後下面是一個複製我的滯後問題的示例。一旦我在EditTextView上設置文本,用戶至少需要1.5秒才能輸入另一個字符。在OnTextChanged()
amountEditText.addTextChangedListener(new TextWatcher() {
@Override public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
@Override public void afterTextChanged(Editable s) {}
@Override public void onTextChanged(CharSequence s, int start, int before, int count) {
String amount = s.toString();
if(!amount.equals(current)) {
amountEditText.removeTextChangedListener(this);
amountEditText.setText(s);
Selection.setSelection(amountEditText.getText(), amountEditText.getText().length());
amountEditText.addTextChangedListener(this);
}
}
});
我已經四處搜索,還沒有找到解決方案。
請檢查這個鏈接。它可能會幫助你 https://github.com/BlacKCaT27/CurrencyEditText – bhaumiksoni