adding image keyboard support (and some cleanup)
This commit is contained in:
parent
018be25137
commit
2dfd83ef97
2 changed files with 6 additions and 41 deletions
|
|
@ -29,7 +29,6 @@ public class EditTextTyped extends AppCompatMultiAutoCompleteTextView {
|
|||
|
||||
private InputConnectionCompat.OnCommitContentListener onCommitContentListener;
|
||||
private String[] mimeTypes;
|
||||
private OnPasteListener onPasteListener;
|
||||
|
||||
public EditTextTyped(Context context) {
|
||||
super(context);
|
||||
|
|
@ -39,10 +38,6 @@ public class EditTextTyped extends AppCompatMultiAutoCompleteTextView {
|
|||
super(context, attributeSet);
|
||||
}
|
||||
|
||||
public void addOnPasteListener(OnPasteListener mOnPasteListener) {
|
||||
this.onPasteListener = mOnPasteListener;
|
||||
}
|
||||
|
||||
public void setMimeTypes(String[] types,
|
||||
InputConnectionCompat.OnCommitContentListener listener) {
|
||||
mimeTypes = types;
|
||||
|
|
@ -61,28 +56,4 @@ public class EditTextTyped extends AppCompatMultiAutoCompleteTextView {
|
|||
return connection;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTextContextMenuItem(int id) {
|
||||
boolean consumed = super.onTextContextMenuItem(id);
|
||||
switch (id) {
|
||||
case android.R.id.paste:
|
||||
onPaste();
|
||||
break;
|
||||
}
|
||||
return consumed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Text was pasted into the EditText.
|
||||
*/
|
||||
public void onPaste() {
|
||||
if (onPasteListener != null) {
|
||||
onPasteListener.onPaste();
|
||||
}
|
||||
}
|
||||
|
||||
public interface OnPasteListener {
|
||||
void onPaste();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue