views:

288

answers:

1

I want to use following selector drawable for android gallery image will it work ?

<selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
     <item state_selected="true" android:drawable="@drawable/selected_icon" >
     </item>

    <item
        android:drawable="@drawable/unselected_icon" >
    </item>

</selector>

i tried but it is not working

A: 

i am able to fix it by myself.

The same xml file worked as shows above only difference is as under

make sure selected and unselected images having same height and width else it will not work.

Faisal khan