From 77dec6249db9bda779e07a05674f85ba38b51e4b Mon Sep 17 00:00:00 2001 From: Steven Luo Date: Thu, 30 Jun 2011 06:50:40 -0700 Subject: [PATCH] Make sure a Send button is available in landscape when ImeExtract is disabled --- .../src/org/yaaic/activity/ConversationActivity.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/application/src/org/yaaic/activity/ConversationActivity.java b/application/src/org/yaaic/activity/ConversationActivity.java index ae44036..24a2bc9 100644 --- a/application/src/org/yaaic/activity/ConversationActivity.java +++ b/application/src/org/yaaic/activity/ConversationActivity.java @@ -201,9 +201,6 @@ public class ConversationActivity extends Activity implements ServiceConnection, EditText input = (EditText) findViewById(R.id.input); input.setOnKeyListener(inputKeyListener); - if (!settings.imeExtract()){ - input.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI); - } switcher = (ViewSwitcher) findViewById(R.id.switcher); @@ -250,12 +247,14 @@ public class ConversationActivity extends Activity implements ServiceConnection, if (settings.autoCapSentences()) { setInputTypeFlags |= InputType.TYPE_TEXT_FLAG_CAP_SENTENCES; } - if (isLandscape) { + if (isLandscape && settings.imeExtract()) { /* Replace the Enter key with a smiley instead of Send, to make it more difficult to accidentally hit send We'd like to do this in portrait too, but wouldn't have a Send button in that case */ setInputTypeFlags |= InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE; + } else { + input.setImeOptions(input.getImeOptions() | EditorInfo.IME_FLAG_NO_EXTRACT_UI); } input.setInputType(input.getInputType() | setInputTypeFlags);