Setting Theme.Holo.Light changes everything except checkboxes in list
<style name="CustomTheme" parent="@android:style/Theme.Holo.Light">
I made my own theme and added a referenc开发者_如何学编程e to it in my manifest. Everything looks perfect (buttons, textboxes etc) except for the checkboxes in my custom list.
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
The checkbox in my listitem is the default checkbox from Theme.Holo and I can't figure out why.
Grateful for any help!
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/
精彩评论