From bf85d304211727ea20ca81d022e9df8d873b78bd Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 16 Feb 2018 13:39:40 +0100 Subject: [PATCH] fixed hint color for edit message --- build.gradle | 1 + .../siacs/conversations/ui/widget/EditMessage.java | 12 +++--------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index ca47f510a..a1e8d2c27 100644 --- a/build.gradle +++ b/build.gradle @@ -40,6 +40,7 @@ dependencies { implementation 'com.soundcloud.android:android-crop:1.0.1@aar' implementation "com.android.support:support-v13:$supportLibVersion" implementation "com.android.support:appcompat-v7:$supportLibVersion" + implementation "com.android.support:support-emoji-appcompat:$supportLibVersion" implementation "com.android.support:support-emoji:$supportLibVersion" freeImplementation "com.android.support:support-emoji-bundled:$supportLibVersion" implementation 'org.bouncycastle:bcmail-jdk15on:1.58' diff --git a/src/main/java/eu/siacs/conversations/ui/widget/EditMessage.java b/src/main/java/eu/siacs/conversations/ui/widget/EditMessage.java index 2f183b371..460e3d0c7 100644 --- a/src/main/java/eu/siacs/conversations/ui/widget/EditMessage.java +++ b/src/main/java/eu/siacs/conversations/ui/widget/EditMessage.java @@ -1,6 +1,6 @@ package eu.siacs.conversations.ui.widget; -import android.support.text.emoji.widget.EmojiEditText; +import android.support.text.emoji.widget.EmojiAppCompatEditText; import android.support.v13.view.inputmethod.EditorInfoCompat; import android.support.v13.view.inputmethod.InputConnectionCompat; import android.support.v13.view.inputmethod.InputContentInfoCompat; @@ -19,15 +19,9 @@ import android.view.inputmethod.InputConnection; import eu.siacs.conversations.Config; -public class EditMessage extends EmojiEditText { +public class EditMessage extends EmojiAppCompatEditText { - private static final InputFilter SPAN_FILTER = new InputFilter() { - - @Override - public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { - return source instanceof Spanned ? source.toString() : source; - } - }; + private static final InputFilter SPAN_FILTER = (source, start, end, dest, dstart, dend) -> source instanceof Spanned ? source.toString() : source; protected Handler mTypingHandler = new Handler(); protected KeyboardListener keyboardListener; private OnCommitContentListener mCommitContentListener = null;