Hello,
Welcome to our Microsoft Q&A platform!
but I only want to change the color of the inside of the square
We cannot change the color of the square space inside the checkBox because the space works as an outside frame instead of a whole square area. Please see the below code, I add background for the parent layout and we can see that the square is like hollow.
<LinearLayout ...
android:orientation="vertical"
android:background="#3498">
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
It's avialable to change the color of the 'frame', try to define the style in the styles.xml.
<style name="MyCheckBox" parent="AppTheme">
<item name="colorControlNormal">@color/theColor</item>
<item name="colorControlActivated">@color/theColor</item>
</style>
Best Regards,
Jarvan Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.