CSC的程式設計相關研究紀錄、開發日誌

EditText, Focus, Soft Keyboard...

How to close/hide the Android Soft Keyboard?

Issue 2705: Setting requestFocus on EditText prevents soft keyboard from opening

Uhh...I've got some problems here.
But I gotta sleep now...
Sadly, tomorrow is MONDAY... Maybe I have to solve these problems next Saturday.
*Sigh*

Two more issues:
Issue 2771: Disabled EditText can still be edited using on-screen keyboard

Issue 3341: setFocusable() & setFocusableInTouchMode() don't work coreectly

So the solution's here:
Whe you wanna completely disable the soft-kb:

InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);

imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);

沒有留言 :

張貼留言