0

I'm currently developing an app with an selector as the app icon.

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/icon_pressed" android:state_pressed="true" />
    <item android:drawable="@drawable/icon_selected" android:state_selected="true" />
    <item android:drawable="@drawable/icon_disabled" android:state_enabled="false" />
    <item android:drawable="@drawable/icon_normal" />
</selector>

For some reason, our app is displayed in disabled state (android:state_enabled = "false") in Settings App(Settings -> Apps).

I work on an customized Android OS project and our Settings app use ApplicationsState.getEntry(packageName, UserId) to fetch the app info. We checked the state of the ImageView that contains the app icon, its enabled=true.

I also double-checked our app's ApplicationInfo. It is enabled.

I'm not sure what else might be the cause of this issue. It looks like some of the apps in our OS also has android:state_enabled="false" in their app icon selector. But they do not have this issue.

0

Browse other questions tagged or ask your own question.