From ecdc285378a23b4e3e5710ae3799b65aca05f185 Mon Sep 17 00:00:00 2001 From: Alan Evans Date: Mon, 8 Apr 2019 07:45:16 -0300 Subject: [PATCH] Fix unresponsive button on image send with text in landscape. Fixes #8575 Closes #8638 Co-authored-by: Jakub Gregorek --- .../thoughtcrime/securesms/mediasend/MediaSendFragment.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/org/thoughtcrime/securesms/mediasend/MediaSendFragment.java b/src/org/thoughtcrime/securesms/mediasend/MediaSendFragment.java index e44cc34b80..496158ac38 100644 --- a/src/org/thoughtcrime/securesms/mediasend/MediaSendFragment.java +++ b/src/org/thoughtcrime/securesms/mediasend/MediaSendFragment.java @@ -25,6 +25,7 @@ import android.view.View; import android.view.ViewGroup; import android.view.ViewTreeObserver; import android.view.WindowManager; +import android.view.inputmethod.EditorInfo; import android.widget.TextView; import org.thoughtcrime.securesms.R; @@ -211,6 +212,11 @@ public class MediaSendFragment extends Fragment implements ViewTreeObserver.OnGl .or(Optional.fromNullable(recipient.getProfileName()) .or(recipient.getAddress().serialize())); composeText.setHint(getString(R.string.MediaSendActivity_message_to_s, displayName), null); + composeText.setOnEditorActionListener((v, actionId, event) -> { + boolean isSend = actionId == EditorInfo.IME_ACTION_SEND; + if (isSend) sendButton.performClick(); + return isSend; + }); if (TextSecurePreferences.isSystemEmojiPreferred(getContext())) { emojiToggle.setVisibility(View.GONE);