I have ICS app with layout which use a ImageView with drawable list. I try to set imageLevel to it but pic doesn’t change.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:maxLevel="0"
android:drawable="@drawable/main_activity_idle" />
<item
android:maxLevel="1"
android:drawable="@drawable/main_activity_upload" />
<item
android:maxLevel="2"
android:drawable="@drawable/main_activity_download" />
</layer-list>
<ImageView
android:id="@+id/main_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="6dp"
android:layout_below="@+id/main_panel_logo"
android:layout_alignParentRight="true"
android:src="@drawable/main__dr_list" />
statusIndicator = (ImageView) findViewById(R.id.main_panel_activity);
statusIndicator.setImageLevel(0);
Do you know why it happens?
You should use
level-listinstead oflayer-list.