revised send button in landscape mode

This commit is contained in:
iNPUTmice 2014-09-27 10:51:46 +02:00
parent 92197a4796
commit 6e77343407
2 changed files with 3 additions and 2 deletions

View file

@ -37,7 +37,7 @@
android:layout_toLeftOf="@+id/textSendButton" android:layout_toLeftOf="@+id/textSendButton"
android:background="@color/primarybackground" android:background="@color/primarybackground"
android:ems="10" android:ems="10"
android:imeOptions="flagNoExtractUi" android:imeOptions="flagNoExtractUi|actionSend"
android:inputType="textShortMessage|textMultiLine|textCapSentences" android:inputType="textShortMessage|textMultiLine|textCapSentences"
android:minHeight="48dp" android:minHeight="48dp"
android:minLines="1" android:minLines="1"

View file

@ -76,10 +76,11 @@ public class ConversationFragment extends Fragment {
@Override @Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { 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() InputMethodManager imm = (InputMethodManager) v.getContext()
.getSystemService(Context.INPUT_METHOD_SERVICE); .getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(), 0); imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
sendMessage();
return true; return true;
} else { } else {
return false; return false;