setOnClickListener with app:enabled="false"
Closed this issue · 1 comments
dinhthaidaica commented
I'd like to make ExtendedEditText
is disable,
just allow user to click on TextFieldBoxes
and then select an value then update text to ExtendedEditText
.
When I set TextFieldBoxes
with app:enabled="false"
--> OnClickListener
is not working.
And with app:enabled="true"
, I can not find a way to make ExtendedEditText
to be disable.
Could you please give me an suggestion?
Thank you a lot.
HITGIF commented
You need to disable ExtendedEditText
with Java code.
Just use .setEnabled(false)
on the desired the ExtendedEditText
to disable it.
This is because when initializing the view, the TextFieldBoxes
is enabled by default, which enables the corresponding ExtendedEditText
as well, thus disabling it in xml will fail.