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:
Jake McGinty 2015-01-05 16:44:56 -08:00 committed by Moxie Marlinspike
parent c04b675a1a
commit 2f20bb89f3
32 changed files with 14 additions and 20 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -86,9 +86,12 @@
android:autoText="true"
android:capitalize="sentences"
android:background="@drawable/compose_background"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingRight="0dp"
android:paddingLeft="0dp"
android:imeOptions="actionSend|flagNoEnterAction|flagNoExtractUi"
android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
android:inputType="textAutoCorrect|textCapSentences"
android:maxLength="2000"
android:maxLines="4"
android:nextFocusForward="@+id/send_button"

View File

@ -48,8 +48,8 @@
<item name="conversation_transport_sms_indicator">@drawable/ic_send_sms_insecure</item>
<item name="conversation_transport_push_indicator">@drawable/ic_send_push</item>
<item name="conversation_transport_popup_background">@color/white</item>
<item name="conversation_emoji_toggle">@drawable/ic_emoji_dark</item>
<item name="conversation_keyboard_toggle">@drawable/ic_ime_dark</item>
<item name="conversation_emoji_toggle">@drawable/ic_mood_grey600_24dp</item>
<item name="conversation_keyboard_toggle">@drawable/ic_keyboard_grey600_24dp</item>
<item name="conversation_attach_file">@drawable/ic_attach_file_light</item>
<item name="conversation_attach_image">@drawable/ic_image_light</item>
<item name="conversation_attach_video">@drawable/ic_movie_creation_light</item>
@ -185,8 +185,8 @@
<item name="conversation_transport_sms_indicator">@drawable/ic_send_sms_insecure_dark</item>
<item name="conversation_transport_push_indicator">@drawable/ic_send_push</item>
<item name="conversation_transport_popup_background">@color/black</item>
<item name="conversation_emoji_toggle">@drawable/ic_emoji_light</item>
<item name="conversation_keyboard_toggle">@drawable/ic_ime_light</item>
<item name="conversation_emoji_toggle">@drawable/ic_mood_white_24dp</item>
<item name="conversation_keyboard_toggle">@drawable/ic_keyboard_white_24dp</item>
<item name="conversation_attach_file">@drawable/ic_attach_file_dark</item>
<item name="conversation_attach_image">@drawable/ic_image_dark</item>
<item name="conversation_attach_video">@drawable/ic_movie_creation_dark</item>

View File

@ -6,16 +6,10 @@
android:title="@string/preferences__textsecure_messages"
android:summary="@string/preferences__use_the_data_channel_for_communication_with_other_textsecure_users"/>
<CheckBoxPreference android:defaultValue="false"
android:key="pref_enter_key"
android:title="@string/preferences__enable_enter_key_title"
android:summary="@string/preferences__replace_smiley_with_enter_key"/>
<CheckBoxPreference android:defaultValue="false"
android:key="pref_enter_sends"
android:summary="@string/preferences__pressing_the_enter_key_will_send_text_messages"
android:title="@string/preferences__pref_enter_sends_title"
android:dependency="pref_enter_key"/>
android:title="@string/preferences__pref_enter_sends_title"/>
<Preference android:key="pref_choose_identity"
android:title="@string/preferences__choose_identity"

View File

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