Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android prevent keyboard from closing

Is it possible to prevent the user from closing the soft keyboard. In other words, keyboard to be available on the screen (at all times) while my activity is visible. Is this possible? If so, how would you accomplish it?

like image 976
William Seemann Avatar asked Nov 25 '22 14:11

William Seemann


1 Answers

This should force the keyboard to show regardless of focus :

InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(yourViewObject.getWindowToken(), 0);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
like image 65
ONE Avatar answered Dec 16 '22 05:12

ONE