Android checkbox state_enabled

2019-04-04 01:56发布

问题:

the xml element "enabled" for a checkbox is deprecated. Eclipse tells me to use state_enabled instead. I tried to add

android:state_enabled="false"

to my checkbox within my xml instead of

android:enabled="false"

But it doesn't show any effect. The latter one does the desired. I don't want to use a deprecated method. Am I doing something wrong?

Thanks.

回答1:

This thread discusses this. Romain Guy says it is not deprecated but perhaps some bug/issue in Eclipse or the ADT editor causes it to show up in the deprecated section.