LinearLayout l = (LinearLayout) findViewById(R.id.backgroundLayout);
l.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE))
.hideSoftInputFromWindow(getCurrentFocus()
.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
}
});
点击键盘外面的区域隐藏键盘
最新推荐文章于 2022-01-26 10:45:14 发布