Xamarin.Android 隐藏软键盘

引用:

using Android.Views.InputMethods;

代码:

//隐藏键盘
InputMethodManager imm = (InputMethodManager)this.GetSystemService(Context.InputMethodService);
if (imm != null)
{
    imm.HideSoftInputFromWindow(this.Window.DecorView.WindowToken, 0);

} 

 

posted @ 2019-01-05 00:58  没事儿写个bug  阅读(1301)  评论(3编辑  收藏  举报