展会信息港展会大全

android开发EDITTEXT调用和隐藏输入法
来源:互联网   发布日期:2016-01-06 19:13:55   浏览:2874次  

导读:android 隐藏输入法 editText=(EditText)findViewById(R id txtBody); editText setOnTouchListener(new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { editT ...

android 隐藏输入法

editText=(EditText)findViewById(R.id.txtBody);

editText.setOnTouchListener(new OnTouchListener() {

public boolean onTouch(View v, MotionEvent event) {

editText.setInputType(InputType.TYPE_NULL); // 关闭软键盘

return false;

}

});

android 调用输入法

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

m.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);

赞助本站

人工智能实验室
AiLab云推荐
推荐内容
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港