Xamarin.Andorid 监听 EditText 回车事件

EditText  ET_Billcode.EditorAction += ET_Billcode_EditorAction;



//执行方法
 private void ET_Billcode_EditorAction(object sender, TextView.EditorActionEventArgs e)
        {
            if (e.Event == null && e.ActionId != ImeAction.Done) { return; }
            if ((e.Event?.Action == KeyEventActions.Down && e.Event?.KeyCode == Keycode.Enter) || e.ActionId == ImeAction.Done) 
            {

            }
        }

 

posted @ 2022-07-08 14:25  LuoCore  阅读(184)  评论(0编辑  收藏  举报