From 6e7734340797c0e929a3669056d0c1361cac7384 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sat, 27 Sep 2014 10:51:46 +0200 Subject: revised send button in landscape mode --- res/layout/fragment_conversation.xml | 2 +- src/eu/siacs/conversations/ui/ConversationFragment.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/res/layout/fragment_conversation.xml b/res/layout/fragment_conversation.xml index 0f5f692e..f9aae10a 100644 --- a/res/layout/fragment_conversation.xml +++ b/res/layout/fragment_conversation.xml @@ -37,7 +37,7 @@ android:layout_toLeftOf="@+id/textSendButton" android:background="@color/primarybackground" android:ems="10" - android:imeOptions="flagNoExtractUi" + android:imeOptions="flagNoExtractUi|actionSend" android:inputType="textShortMessage|textMultiLine|textCapSentences" android:minHeight="48dp" android:minLines="1" diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index feed9df5..9e2d39e5 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -76,10 +76,11 @@ public class ConversationFragment extends Fragment { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { - if (actionId == EditorInfo.IME_ACTION_DONE) { + if (actionId == EditorInfo.IME_ACTION_SEND) { InputMethodManager imm = (InputMethodManager) v.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(v.getWindowToken(), 0); + sendMessage(); return true; } else { return false; -- cgit v1.2.3