输入法软键盘弹出
调用 open(null);
/***当前弹出则关闭*否则弹出*@paramv*/@SuppressWarnings("static-access")publicvoidopen(Viewv){InputMethodManagerinputMethodManager=(InputMethodManager)getSystemService(getApplicationContext().INPUT_METHOD_SERVICE);booleanisOpen=inputMethodManager.isActive();//isOpen若返回true,则表示输入法打开if(!isOpen){inputMethodManager.toggleSoftInput(0,InputMethodManager.SHOW_FORCED);}else{inputMethodManager.toggleSoftInput(0,InputMethodManager.SHOW_FORCED);}}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。