1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-25 18:32:15 -05:00

Make sure a Send button is available in landscape when ImeExtract is disabled

This commit is contained in:
Steven Luo 2011-06-30 06:50:40 -07:00 committed by Sebastian Kaspari
parent 6da6a7b76b
commit 77dec6249d

View File

@ -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);