Setting Theme.Holo.Light changes everything except checkboxes in list

孤人 提交于 2019-12-05 18:19:40

I am having the same problem. I have no idea why it isn't choosing the correct checkbox - you can barely see it on the light background. For now, I copied the appropriate holo light checkbox images out the of the android drawable folders and into my project. I then created my own that referenced these images. I then set the android:button attribute to my new selector xml. My selector xml looks like this:

<selector xmlns:android="http://schemas.android.com/apk/res/android" >
        <item android:state_checked="true" android:state_focused="true"
                android:drawable="@drawable/btn_check_on_focused_holo_light" /> 
        <item android:state_checked="false" android:state_focused="true"
                android:drawable="@drawable/btn_check_off_focused_holo_light" />
        <item android:state_checked="false"
                android:drawable="@drawable/btn_check_off_holo_light" />
        <item android:state_checked="true"
                android:drawable="@drawable/btn_check_on_holo_light" />
</selector>

Make sure you copy all of the different density images (xhdpi, hdpi, etc.) into your project.

The same thing happened to me but with radio buttons, as henry000 wrote.

I downloaded the original holo-light themed radiobuttons images and XML layouts from http://android-holo-colors.com/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!