Removing the 'box' from the checkbox in Android

android, checkbox

Solution

put the following attribute in your checkbox tag in XML.

android:button="@android:color/transparent"

Problem

I am an entry level software developer, and have found tons of great answers from this site, but I can't seem to find how to hide the 'box' of a checkbox in Android. I just want the check mark to show, when a user selects an option. Here are some of the most recent things I have tried. chkSortOrder.setBackgroundResource(android.R.color.transparent); chkSortOrder.setBackgroundResource(android.R.drawable.checkbox_off_background); Both of these still show the box.

Original source

Related problems