当有人点击TextView字段时,如何让键盘显示?
答案 0 :(得分:4)
void button_Click(object sender, EventArgs e)
{
InputMethodManager imm = (InputMethodManager)GetSystemService(InputMethodService);
imm.ToggleSoftInput(ShowSoftInputFlags.Forced,HideSoftInputFlags.None );
}
答案 1 :(得分:2)
在textview上单击
使用它InputMethodManager imm=(InputMethodManager)getSystemService(yourActivity.this.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);