Hi,

I am now working with a simple launcher with a sliding drawer. Along
with highlighting the application icons on the drawer with a
background picture, I want the icon itself can change when it is
pressed.

In AndroidManifest.xml of a test application:
<application android:icon="@drawable/icon" ...>
...
</application>

The icon under drawable was originally icon.png, I changed it to
icon.xml:
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android";>
        <item android:state_pressed="true" android:drawable="@drawable/
icon_pressed"/>
        <item android:drawable="@drawable/icon_normal" />
</selector>

With above modification, icon_normal.png is shown whenever the icon is
pressed or not. I don't now where is the bug. Please help.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to