I want to make an Editext only focus when I programmably tell it to and not allow the user to press on the one he wants. Is this possible?
I tried
android:longClickable="false" android:clickable="false"
But neither worked.
For some reason people are thinking the following solves my problem, but that person is trying to make an edit text not editable, where I am trying to make an edit text only not focusable by clicking
EditText not editable
Try with
android:focusable="false"
android:focusableInTouchMode="false"
I ran into the same issue and solved it by using:
.setEnabled(false) and .setClickable(false)
so use this for your code:
.setEnabled(false);
.setClickable(false);
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