点击空白地方隐藏输入框
View mainView;
private void getViewId() {
mainView = exchangeDetailed.findViewById(R.id.main_view);
}
private void addListener() {
mainView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN)
if (KeyBoardOper.isKeyBoardOpen(context)) {
KeyBoardOper.hideKeyBoard(context, chooseStart);
}
return false;
}
});
}