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); }
private void AnActionButton_Click(object sender, System.EventArgs e) { Button actionButton = sender as Button; OpenAction openAction = actionButton.GetTag(DefaultActionIdentificator) as OpenAction; if (openAction.ActionRepresentDirectReply()) { notificationActions.Visibility = ViewStates.Invisible; inlineNotificationContainer.Visibility = ViewStates.Visible; inlineresponse.Hint = openAction.GetPlaceholderTextForInlineResponse(); sendinlineresponse.SetTag(DefaultActionIdentificator, openAction); sendinlineresponse.Click += Sendinlineresponse_Click; SendInlineResponseAvailabityChanged?.Invoke(null, true); //Is currently showing. } else { openAction.ClickAction(); SendInlineResponseAvailabityChanged?.Invoke(null, false); //Here I assume the send inline textbox is not present, because the action simply does not represent a direct reply. } }
protected virtual void ActionButton_Click(object sender, EventArgs e) { Button actionButton = sender as Button; OpenAction openAction = actionButton.GetTag(DefaultActionIdentificator) as OpenAction; if (openAction.ActionRepresentDirectReply()) { if (new ConfigurationManager(AppPreferences.Default).RetrieveAValue(ConfigurationParameters.EnableQuickReply)) { NotificationActions.Visibility = ViewStates.Invisible; InlineResponseNotificationContainer.Visibility = ViewStates.Visible; InlineResponse.Hint = openAction.GetPlaceholderTextForInlineResponse(); SendInlineResponse.SetTag(DefaultActionIdentificator, openAction); SendInlineResponse.Click += SendInlineResponse_Click; SendInlineResponseAvailabityChanged?.Invoke(null, true); } } else { openAction.ClickAction(); } }