aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-11-20 21:00:16 +0100
committerChristian Schneppe <christian@pix-art.de>2017-11-20 21:00:16 +0100
commitf99bc5ede6876f2be3071205950e4251995ac3d9 (patch)
treef04daee0e9e39356d1f54108e0a9828cc7a1106a
parent7949c0ac2947ead64615d90cf9e7867297e53427 (diff)
disable auto fill on edit message box
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditMessage.java74
1 files changed, 36 insertions, 38 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/EditMessage.java b/src/main/java/de/pixart/messenger/ui/EditMessage.java
index 479fd3445..46922b98a 100644
--- a/src/main/java/de/pixart/messenger/ui/EditMessage.java
+++ b/src/main/java/de/pixart/messenger/ui/EditMessage.java
@@ -21,22 +21,20 @@ import de.pixart.messenger.Config;
public class EditMessage extends EditText {
- private OnCommitContentListener mCommitContentListener = null;
- private String[] mimeTypes = null;
-
- public interface OnCommitContentListener {
- boolean onCommitContent(InputContentInfoCompat inputContentInfo, int flags, Bundle opts, String[] mimeTypes);
- }
+ private static final InputFilter SPAN_FILTER = new InputFilter() {
- public EditMessage(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
+ @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 KeyboardListener keyboardListener;
- public EditMessage(Context context) {
- super(context);
- }
+ private OnCommitContentListener mCommitContentListener = null;
+ private String[] mimeTypes = null;
- protected Handler mTypingHandler = new Handler();
+ private boolean isUserTyping = false;
protected Runnable mTypingTimeout = new Runnable() {
@Override
@@ -48,11 +46,15 @@ public class EditMessage extends EditText {
}
};
- private boolean isUserTyping = false;
-
private boolean lastInputWasTab = false;
- protected KeyboardListener keyboardListener;
+ public EditMessage(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public EditMessage(Context context) {
+ super(context);
+ }
@Override
public boolean onKeyDown(int keyCode, KeyEvent e) {
@@ -98,28 +100,6 @@ public class EditMessage extends EditText {
}
}
- public interface KeyboardListener {
- boolean onEnterPressed();
-
- void onTypingStarted();
-
- void onTypingStopped();
-
- void onTextDeleted();
-
- void onTextChanged();
-
- boolean onTabPressed(boolean repeated);
- }
-
- 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;
- }
- };
-
@Override
public boolean onTextContextMenuItem(int id) {
if (id == android.R.id.paste) {
@@ -168,4 +148,22 @@ public class EditMessage extends EditText {
return ic;
}
}
+
+ public interface OnCommitContentListener {
+ boolean onCommitContent(InputContentInfoCompat inputContentInfo, int flags, Bundle opts, String[] mimeTypes);
+ }
+
+ public interface KeyboardListener {
+ boolean onEnterPressed();
+
+ void onTypingStarted();
+
+ void onTypingStopped();
+
+ void onTextDeleted();
+
+ void onTextChanged();
+
+ boolean onTabPressed(boolean repeated);
+ }
}