先让你的EditText获取到焦点 requestFocus(), requestFocusFromTouch()然后调下面的APIInputMethodManager :public boolean showSoftInput (View view, int flags)Added in API level 3Synonym for showSoftInput(View, int, ResultReceiver) without a result receiver: explicitly request that the current input method's soft input area be shown to the user, if neededParametersview The currently focused view, which would like to receive soft keyboard inputflags Provides additional operating flags Currently may be 0 or have the SHOW_IMPLICIT bit setpublic vo
问题补充:首先我确定他问的肯定是WinForm项目
其次我都给他写了一个事件难道非的写全代码下面这个事件可以键盘上下移动时改变privatevoidlistView1_ItemSelectionChanged(objectsender,ListViewItemSelectionChangedEventArgse)
{
try
{
strings=thislistView1SelectedItems[0]Text;
TextBox1Text=s;
}
catch(Exceptionex)
{}
}--------------------------------------------
privatevoidlistView1_Click(objectsender,EventArgse)
{
try
{
strings=thislistView1SelectedItems[0]Text;
TextBox1Text=s;
}
catch(Exceptionex)
{
MessageBoxShow(exToString());
}
}
以上就是关于在新增一行的时候怎么让ListView里的EditText获取焦点全部的内容,包括:在新增一行的时候怎么让ListView里的EditText获取焦点、如何捕获ListView中的EditText失去焦点事件、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)