Skip to content

@ui-philip /InputView secret
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
public class InputView extends EditText
{
private Context context;
public InputView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init(context);
}
public InputView(Context context, AttributeSet attrs) {
super(context, attrs);
init(context);
}
public InputView(Context context) {
super(context);
init(context);
}
private void init(Context context) {
this.context = context;
}
@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
MyInputConnection ic = new MyInputConnection(this, false);
return ic;
}
public class MyInputConnection extends BaseInputConnection {
public MyInputConnection(View targetView, boolean fullEditor) {
super(targetView, fullEditor);
}
@Override
public boolean deleteSurroundingText(int beforeLength, int afterLength) {
// Never gets called...
return super.deleteSurroundingText(beforeLength, afterLength);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.