I do not have the property android:state_enabled for any of the controls. Typing it manually doesn't work either. I can only use the deprecated android:enabled.
I have the latest everything.
See this answer from a similar thread: it says android:enabled is not actually deprecated, it's just an Eclipse error.
https://stackoverflow.com/a/6919200/813810
How exactly are you using the state_enabled property?
It is a read-only property to check if the view is enabled, not to set the view as enabled/disabled! Please check http://developer.android.com/reference/android/graphics/drawable/StateListDrawable.html
As an example, I am using the following code that works since Android 1.5, check if it works for you:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:drawable="@drawable/image_disabled" />
<item android:drawable="@drawable/image_enabled" />
</selector>
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