Skip to content

Commit

Permalink
Make sure a Send button is available in landscape when ImeExtract is …
Browse files Browse the repository at this point in the history
…disabled
  • Loading branch information
steven676 authored and pocmo committed Jul 2, 2011
1 parent 6da6a7b commit 77dec62
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions application/src/org/yaaic/activity/ConversationActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,6 @@ protected void onCreate(Bundle savedInstanceState)

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

Expand Down Expand Up @@ -250,12 +247,14 @@ protected void onCreate(Bundle savedInstanceState)
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);

Expand Down

0 comments on commit 77dec62

Please sign in to comment.