如何以编程方式隐藏键盘三星Galaxy Note在android系统键盘、方式、系统、Galaxy

2023-09-07 13:37:49 作者:傲娇的小伙子

我使用的数据和两个编辑文本时选择器,我想隐藏键盘两个编辑text.I正在做这样的

I am using data and time picker for two edit text, I want to hide keyboard for two edit text.I am doing like this

mDatePickerEdt = (EditText)findViewById(R.id.createwedding_datepicker_edt);
mTimePickerEdt = (EditText)findViewById(R.id.createwedding_timepicker_edt);
mDatePickerEdt.setInputType(InputType.TYPE_NULL);
mTimePickerEdt.setInputType(InputType.TYPE_NULL);

它正在为智能phones.I获得问题的三星Galaxy note.If任何一个事先已idea.Please帮助,谢谢。

it is working for smart phones.I getting problem in samsung galaxy note.If any one have idea.Please help, Thanks in advance.

推荐答案

您可以使用以下code隐藏键盘。

you can use following code to hide keyboard.

 getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);