开发者

android gallery item selector

开发者 https://www.devze.com 2023-01-03 20:55 出处:网络
I want to use following selector drawable for android gallery image will it work ? <selector xmlns:android=\"http://schemas.android.com/apk/res/android\">

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

精彩评论

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

关注公众号