private void SendInlineResponse_Click(object sender, EventArgs e) { ImageButton actionButton = sender as ImageButton; OpenAction openAction = actionButton.GetTag(DefaultActionIdentificator) as OpenAction; openAction.SendInlineResponse(InlineResponse.Text); InlineResponse.Text = string.Empty; NotificationActions.Visibility = ViewStates.Visible; InlineResponseNotificationContainer.Visibility = ViewStates.Invisible; // Check if no view has focus: View view = NotificationFragment?.Activity?.CurrentFocus; if (view != null) { InputMethodManager imm = (InputMethodManager)NotificationFragment.Activity.GetSystemService(Context.InputMethodService); imm.HideSoftInputFromInputMethod(view.WindowToken, 0); } SendInlineResponseAvailabityChanged?.Invoke(null, false); }