C# 编程软输入键盘ime操作键,将光标移动到下一行
我正在尝试编程操作ime键按钮,这样当用户单击它时,光标会移动到同一编辑文本字段中下一行的开头,我注意到一些流行的应用程序,如whatsapp,会覆盖enter键,以便在用户单击时将光标移动到编辑文本中的下一行。。。 这是我所知道的远的C# 编程软输入键盘ime操作键,将光标移动到下一行,c#,android,cursor,line,C#,Android,Cursor,Line,我正在尝试编程操作ime键按钮,这样当用户单击它时,光标会移动到同一编辑文本字段中下一行的开头,我注意到一些流行的应用程序,如whatsapp,会覆盖enter键,以便在用户单击时将光标移动到编辑文本中的下一行。。。 这是我所知道的远的 class Notes:AppCompatActivity { EditText mynotes; protected override void OnCreate(Bundle savedInstanceState)
class Notes:AppCompatActivity
{
EditText mynotes;
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
SetContentView(Resource.Layout.Notes);
//Define Edit Text
mynotes=this.FindViewById<EditText>(Resource.Id.editext1);
//Add action key pressed event handler
mynotes.EditorAction += Notes_EditorAction;
}
//action key method to move cursor to the next beginning of the next line
private void Notes_EditorAction(object sender, TextView.EditorActionEventArgs e)
{
//Code to move cursor to next line
}
}
课堂笔记:AppCompatActivity
{
编辑文本注释;
创建时受保护的覆盖无效(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
Xamarin.Essentials.Platform.Init(这个,savedInstanceState);
SetContentView(Resource.Layout.Notes);
//定义编辑文本
mynotes=this.findviewbyd(Resource.Id.editext1);
//添加操作键按下事件处理程序
mynotes.EditorAction+=Notes\u EditorAction;
}
//动作键方法将光标移动到下一行的下一个开头
私有void Notes\u EditorAction(对象发送者,TextView.EditorActionEventArgs e)
{
//将光标移动到下一行的代码
}
}
代码,使行动键的标志显示进入箭头标志将被赞赏n提前,感谢您的输入