I am working on a AutoCompleteTextView
. I get some results when the users type in the AutoCompleteTextView
and these are mandatory to select.
But the problem is the drop down automatically dismisses when clicking on anywhere in the srceen.
I want to avoid this.
Is there any way I can achieve this.
Thanks.
private boolean setForceIgnoreOutsideTouchWithReflexion(boolean forceIgnoreOutsideTouch) {
try {
Method method = android.widget.AutoCompleteTextView.class.getMethod("setForceIgnoreOutsideTouch", boolean.class);
method.invoke(this, forceIgnoreOutsideTouch);
return true;
} catch (Exception e) {
return false;
}
}
Only reflexion in public class CustomAutoCompleteTextView extends AutoCompleteTextView
, but - maybe this not a good solution too
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With