Groups
Groups
Sign in
Groups
Groups
日本Androidの会
Conversations
About
Send feedback
Help
ソフトウェアキーボードの予測変換非表示
458 views
Skip to first unread message
goki
unread,
Jan 18, 2012, 9:06:22 PM
1/18/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 日本Androidの会
お疲れ様です。gokiです。
ソフトウェアキーボードの予測変換を非表示にする設定について質問です。
EditTextに文字を入力したときに予測変換が出ないようにしたいと思っています。
InputMethodManager imm =
(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
EditText editText = ((EditText)findViewById(R.id.editText));
IBinder binder = editText.getWindowToken();
int flag = InputMethodManager.HIDE_IMPLICIT_ONLY;
imm.hideSoftInputFromWindow( binder, flag);
とすれば予測変換部分が非表示にされる、ということまでは調べることができました。
しかし、これをどこに配置しても文字入力時の変換待ち状態、このときにエンターを押して確定した状態。
この両方で予測変換が出てきてしまいます。
TextWatcherの、
- afterTextChanged
- beforeTextChanged
- onTextChanged
EditTextの
- setOnFocusChangeListener
- setOnEditorActionListener
- setOnKeyListener
で試してみました。
Logを配置してみたのですが、どの箇所も通過した形跡があるのに
予測変換は非表示になりません。
どこに記述したらいいのでしょうか?
そもそも、非表示にするソースが間違っているのでしょうか?
よろしくお願いします。
Reply all
Reply to author
Forward
0 new messages