开发者

How to remove default keyboard from emulator in android?

开发者 https://www.devze.com 2023-02-15 16:57 出处:网络
m surffing from one proble. in my project layout i put one edit text to put the text from search data from the database but when i w开发者_运维问答rite in edit text that time default keyboard opens so

m surffing from one proble. in my project layout i put one edit text to put the text from search data from the database but when i w开发者_运维问答rite in edit text that time default keyboard opens so i want to hide this keyboard


Using InputMethodManager, you can force android to hide/show the keyboards. Calling hideSoftInputFromWindow, passing in the token of the window containing your edit field.

InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);

With this you will not see the keyboard at all.

0

精彩评论

暂无评论...
验证码 换一张
取 消