mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-25 12:48:33 +00:00
use internal emoji pane for all android versions
1) Enter key by default (remove as option), still keeping "Enter key sends" option 2) New material assets for emoji and keyboard icons, inc a xxhdpi version finally fixes #2300, fixes #2251, fixes #2183 Closes #2302 // FREEBIE
This commit is contained in:
committed by
Moxie Marlinspike
parent
c04b675a1a
commit
2f20bb89f3
@@ -674,10 +674,12 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
}
|
||||
|
||||
private void initializeIme() {
|
||||
if (TextSecurePreferences.isEnterImeKeyEnabled(this)) {
|
||||
composeText.setInputType(composeText.getInputType() & (~InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE));
|
||||
if (TextSecurePreferences.isEnterSendsEnabled(this)) {
|
||||
composeText.setInputType (composeText.getInputType() & ~InputType.TYPE_TEXT_FLAG_MULTI_LINE);
|
||||
composeText.setImeOptions(composeText.getImeOptions() & ~EditorInfo.IME_FLAG_NO_ENTER_ACTION);
|
||||
} else {
|
||||
composeText.setInputType(composeText.getInputType() | (InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE));
|
||||
composeText.setInputType (composeText.getInputType() | InputType.TYPE_TEXT_FLAG_MULTI_LINE);
|
||||
composeText.setImeOptions(composeText.getImeOptions() | EditorInfo.IME_FLAG_NO_ENTER_ACTION);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -688,10 +690,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
emojiDrawer = Optional.absent();
|
||||
emojiToggle = (EmojiToggle) findViewById(R.id.emoji_toggle);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
emojiToggle.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
attachmentAdapter = new AttachmentTypeSelectorAdapter(this);
|
||||
attachmentManager = new AttachmentManager(this, this);
|
||||
|
||||
@@ -1130,7 +1128,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||
if (actionId == EditorInfo.IME_ACTION_SEND) {
|
||||
sendButton.performClick();
|
||||
composeText.clearFocus();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user