Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私の編集テキストでは、キーボードに「次へ」ボタンを配置しました。問題は、Android 4.0 で [次へ] ボタンを押すと (エミュレーターと Android 4.0 のデバイスでテストしました)、カーソルが単語の末尾ではなく単語の先頭に配置されることです。私は何をすべきか?
ありがとう
注: 私の Motorola Defy (Android 2.2) では問題なく動作しています。
editText の onFocusChangeListener をオーバーライドできます。フォーカスが変更されたときに、このような操作を行ってカーソルをテキストの末尾に設定します。
editText.setSelection(editText.length - 1);