android - How to override CheckBox color using AppCompat -
When my checkbox is checked, I want to have color @ color / color prairam light. I can set it up for lollipops in this way
Android: buttonTint = "@color / colorPrimaryLight" in the checkbox but I do not I know how to do anything without lollipops
About me
Checkbox for Lollipop:
& lt; Checkbox Android :. Android: layout_marginTop = "@ Dimen / margin_top" Android: layout_marginLeft = "@ Dimen / margin_left_right" Android: layout_marginRight = "@ Dimen / margin_left_right" Android: ButtonTint = "@color / colorPrimaryLight" Android: id = "@ + id / swapcheckbox" : Layout_width = "wrap_content" android: layout_height = "wrap-content" /> And for anything more than Lollipop (and more than 4.0.3):
& lt; Android: layout_marginLeft = "@ Dimen / margin_left_right" Android: layout_marginRight = "@ Dimen / margin_left_right" Android: layout_width = "wrap_content": Android: layout_marginTop = "@ Dimen / margin_top" android: id = "@ + id / swapcheckbox" Android: layout_height = "wrap_content" /> And I'm in the topic for my application:
I can not change the color control because it should be white for the pointer in my ViewPager. Is it possible to change the background color of my checkbox anyway (even if it is best for the default Holo style, even if it is set to the @color / color prairie lights)?
Use the following properties in the app compartment theme below
& Lt; Style name = "Aaptim" parent = "theme.competent light" & gt; & Lt; Item name = "color clock" & gt; @ Color / color field & lt; / Item & gt; & Lt; / Style & gt; and use the android.support.v7.widget.AppCompatCheckBox instead of the check box
Comments
Post a Comment