4
O我的acer平板電腦返回不取代由以下xml替換,但在我的其他2 Android設備 因此,我打算使用返回鍵退出鍵盤作爲BCK起來, 問題,我想通了,怎麼辦回調時輸入鍵按下,但不知道如何使鍵盤消失, 代碼如何讓鍵盤消失輸入時按
mUserName=(EditText)findViewById(R.id.viewUserName);
mUserName.setOnEditorActionListener(
new android.widget.TextView.OnEditorActionListener()
{
public boolean onEditorAction(TextView v, int actionId, KeyEvent event)
{
// goes here when enter is press
return false;
}
}
);