点击空白区域隐藏软键盘
2013-07-17 10:20
267 查看
flipperview=(LinearLayout) findViewById(R.id.flipperview01); flipperview.setOnTouchListener(touchListener);
OnTouchListener touchListener=new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { // TODO Auto-generated method stub Log.i("scrollview", "scrollview+++++++++++"); if (event.getAction() == MotionEvent.ACTION_DOWN) { if (getCurrentFocus() != null && getCurrentFocus().getWindowToken() != null) { getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); View inputText = getCurrentFocus(); imm.hideSoftInputFromWindow(inputText.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); } } return false; } };
相关文章推荐
- android点击空白区域隐藏软键盘
- 点击空白区域隐藏软键盘输入法
- android 点击空白区域隐藏软键盘
- Android中点击空白区域隐藏软键盘功能实现
- android点击空白区域隐藏软键盘的实现
- 点击空白区域,隐藏软键盘
- Android点击除edittext外其他区域或控件隐藏软键盘
- ios入门:点击屏幕其他区域,隐藏软键盘
- IOS(1) 点击空白区域隐藏(关闭)键盘
- DrawerLayout 空白区域点击穿透问题
- Activity对话框样式. 点击空白区域关闭窗口
- 多管齐下,点击EditText外区域隐藏软键盘
- 安卓 点击空白处 隐藏软键盘
- 点击空白处,隐藏软键盘
- ios点击键盘以外空白区域隐藏键盘
- iOS点击空白区域隐藏键盘
- 点击空白隐藏软键盘,正常放在activity基类里
- Android中点击空白区域控件自动隐藏(事件传递机制中的一个小例子)
- 提高selenium自动化的稳定性1-点击空白区域
- 点击editext以外其他区域 隐藏软键盘