Hello,
You can use WindowInsetsControllerCompat to show or hide keyboard.
Here is code about showing keyboard.
var ctx = Xamarin.Essentials.Platform.CurrentActivity;
new WindowInsetsControllerCompat(ctx.Window, ctx.Window.DecorView).Show(WindowInsetsCompat.Type.Ime());
Here is code about hiding keyboard.
var ctx = Xamarin.Essentials.Platform.CurrentActivity;
new WindowInsetsControllerCompat(ctx.Window, ctx.Window.DecorView).Hide(WindowInsetsCompat.Type.Ime());
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.