mdidTextView = (AutoCompleteTextView) findViewById(R.id.mdid_autoSearch_editText);
mdidTextView.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
InputMethodManager imm = (InputMethodManager) getSystemService(
Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mdidTextView.getWindowToken(), 0);
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
答案 0 :(得分:0)
试试这个
imm.hideSoftInputFromWindow(view.getWindowToken(), 0)
你是否试过在这里设一个断点?这种方法甚至可以接听电话吗?