我想隐藏键盘:
View view = this.getCurrentFocus();
if (view != null) {
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
}
});
现在我的问题,是getCurrentFocus和getSystemService是红色,它说:
Cannot resolve method getCurrentFocus() / getSystemService()
我究竟做错了什么?
谢谢你的帮助!
米琪卡哇伊
相关分类