fixed hint color for edit message

This commit is contained in:
Daniel Gultsch 2018-02-16 13:39:40 +01:00
parent f81fbb36f1
commit bf85d30421
2 changed files with 4 additions and 9 deletions

View File

@ -40,6 +40,7 @@ dependencies {
implementation 'com.soundcloud.android:android-crop:1.0.1@aar' implementation 'com.soundcloud.android:android-crop:1.0.1@aar'
implementation "com.android.support:support-v13:$supportLibVersion" implementation "com.android.support:support-v13:$supportLibVersion"
implementation "com.android.support:appcompat-v7:$supportLibVersion" implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation "com.android.support:support-emoji-appcompat:$supportLibVersion"
implementation "com.android.support:support-emoji:$supportLibVersion" implementation "com.android.support:support-emoji:$supportLibVersion"
freeImplementation "com.android.support:support-emoji-bundled:$supportLibVersion" freeImplementation "com.android.support:support-emoji-bundled:$supportLibVersion"
implementation 'org.bouncycastle:bcmail-jdk15on:1.58' implementation 'org.bouncycastle:bcmail-jdk15on:1.58'

View File

@ -1,6 +1,6 @@
package eu.siacs.conversations.ui.widget; 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.EditorInfoCompat;
import android.support.v13.view.inputmethod.InputConnectionCompat; import android.support.v13.view.inputmethod.InputConnectionCompat;
import android.support.v13.view.inputmethod.InputContentInfoCompat; import android.support.v13.view.inputmethod.InputContentInfoCompat;
@ -19,15 +19,9 @@ import android.view.inputmethod.InputConnection;
import eu.siacs.conversations.Config; import eu.siacs.conversations.Config;
public class EditMessage extends EmojiEditText { public class EditMessage extends EmojiAppCompatEditText {
private static final InputFilter SPAN_FILTER = new InputFilter() { private static final InputFilter SPAN_FILTER = (source, start, end, dest, dstart, dend) -> source instanceof Spanned ? source.toString() : source;
@Override
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
return source instanceof Spanned ? source.toString() : source;
}
};
protected Handler mTypingHandler = new Handler(); protected Handler mTypingHandler = new Handler();
protected KeyboardListener keyboardListener; protected KeyboardListener keyboardListener;
private OnCommitContentListener mCommitContentListener = null; private OnCommitContentListener mCommitContentListener = null;