From 83e627ca1c4d91d31025deaf7357fa1cea686255 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Mon, 9 Jul 2018 21:45:44 +0200 Subject: use EmojiWrapperEditText for most relevant text inputs --- .../java/de/pixart/messenger/ui/widget/EditMessage.java | 3 +-- .../messenger/ui/widget/EmojiWrapperEditText.java | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 src/main/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java (limited to 'src/main/java/de/pixart') diff --git a/src/main/java/de/pixart/messenger/ui/widget/EditMessage.java b/src/main/java/de/pixart/messenger/ui/widget/EditMessage.java index 8ab582189..2e80decd8 100644 --- a/src/main/java/de/pixart/messenger/ui/widget/EditMessage.java +++ b/src/main/java/de/pixart/messenger/ui/widget/EditMessage.java @@ -6,7 +6,6 @@ import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; -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; @@ -22,7 +21,7 @@ import android.view.inputmethod.InputConnection; import de.pixart.messenger.Config; import de.pixart.messenger.R; -public class EditMessage extends EmojiAppCompatEditText { +public class EditMessage extends EmojiWrapperEditText { private static final InputFilter SPAN_FILTER = (source, start, end, dest, dstart, dend) -> source instanceof Spanned ? source.toString() : source; protected Handler mTypingHandler = new Handler(); diff --git a/src/main/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java b/src/main/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java new file mode 100644 index 000000000..38ce53299 --- /dev/null +++ b/src/main/java/de/pixart/messenger/ui/widget/EmojiWrapperEditText.java @@ -0,0 +1,17 @@ +package de.pixart.messenger.ui.widget; + +import android.content.Context; +import android.support.text.emoji.widget.EmojiAppCompatEditText; +import android.util.AttributeSet; + +public class EmojiWrapperEditText extends EmojiAppCompatEditText { + + public EmojiWrapperEditText(Context context) { + super(context); + } + + public EmojiWrapperEditText(Context context, AttributeSet attrs) { + super(context, attrs); + } + +} \ No newline at end of file -- cgit v1.2.3