If I disable an EditText
widget using
editText.setEnabled(false);
I can still type into it using the on-screen input method (in
etComment.setEnabled(flag);
etComment.setFocusable(flag);
etComment.setFocusableInTouchMode(flag);
if (flag) {
etComment.requestFocus();
}
etComment.setFilters(new InputFilter[] { new InputFilter() {
@Override
public CharSequence filter(
CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
if (!flag) {
return source.length() < 1 ? dest.subSequence(dstart, dend) : "";
}
return null;
}
}
});
for all you can got it!