1. 程式人生 > >Xamarin.Android 隱藏軟鍵盤

Xamarin.Android 隱藏軟鍵盤

引用:

using Android.Views.InputMethods;

程式碼:

//隱藏鍵盤
InputMethodManager imm = (InputMethodManager)GetSystemService(Context.InputMethodService);
if (imm != null)
{
    imm.HideSoftInputFromWindow(this.Window.DecorView.WindowToken, 0);

}