這看起來像一個簡單的問題,但我不明白爲什麼會發生。我想在用戶更改文本之前在我的編輯文本中獲取選擇的開始和結束索引在我TextWatcher我沒有如下: - public void beforeTextChanged(CharSequence s, int start, int count, int after) {
selectionStart = edittext.getS
我設置TextWatcher到EditText像下面。但是當我嘗試清除文本時,光標將在清除每個字母后開始。 class MyInputWatcher implements TextWatcher {
@Override
public void beforeTextChanged(CharSequence s, int start, int count,
int