开发者

android gallery item selector

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

<selector xmlns:android="http://schemas.android.com/apk/res/android">
     <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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜