diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-07-09 21:45:44 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-07-09 21:45:44 +0200 |
commit | 83e627ca1c4d91d31025deaf7357fa1cea686255 (patch) | |
tree | 929bda6a396bc22a9eb2cb2e3ecf2bc0fd9ec28d /src | |
parent | ed2334ae0bbfd84da88bf17dba4fccc7770f5853 (diff) |
use EmojiWrapperEditText for most relevant text inputs
Diffstat (limited to '')
5 files changed, 23 insertions, 7 deletions
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 diff --git a/src/main/res/layout/activity_muc_details.xml b/src/main/res/layout/activity_muc_details.xml index 2c1a0e682..6a514052a 100644 --- a/src/main/res/layout/activity_muc_details.xml +++ b/src/main/res/layout/activity_muc_details.xml @@ -97,7 +97,7 @@ app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error" app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint"> - <android.support.design.widget.TextInputEditText + <de.pixart.messenger.ui.widget.EmojiWrapperEditText android:id="@+id/muc_edit_title" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -111,7 +111,7 @@ app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error" app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint"> - <android.support.design.widget.TextInputEditText + <de.pixart.messenger.ui.widget.EmojiWrapperEditText android:id="@+id/muc_edit_subject" android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/src/main/res/layout/create_conference_dialog.xml b/src/main/res/layout/create_conference_dialog.xml index e3f9d979f..384baa7ca 100644 --- a/src/main/res/layout/create_conference_dialog.xml +++ b/src/main/res/layout/create_conference_dialog.xml @@ -31,7 +31,7 @@ app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error" app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint"> - <android.support.design.widget.TextInputEditText + <de.pixart.messenger.ui.widget.EmojiWrapperEditText android:id="@+id/group_chat_name" style="@style/Widget.Conversations.EditText" android:layout_width="match_parent" diff --git a/src/main/res/layout/dialog_quickedit.xml b/src/main/res/layout/dialog_quickedit.xml index 273bcf1e9..9ab308af8 100644 --- a/src/main/res/layout/dialog_quickedit.xml +++ b/src/main/res/layout/dialog_quickedit.xml @@ -18,7 +18,7 @@ app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error" app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint"> - <android.support.design.widget.TextInputEditText + <de.pixart.messenger.ui.widget.EmojiWrapperEditText android:id="@+id/input_edit_text" style="@style/Widget.Conversations.EditText" android:layout_width="match_parent" @@ -27,7 +27,7 @@ android:inputType="textPersonName"> <requestFocus /> - </android.support.design.widget.TextInputEditText> + </de.pixart.messenger.ui.widget.EmojiWrapperEditText> </android.support.design.widget.TextInputLayout> </LinearLayout> |