0

The default size of the android checkboxes were too small for my purposes, so I changed their overall size, however with their new size their borders now are horribly thick.

In what way could I change the thickness? I quite like the default behavior of the checkboxes, so the only thing I would like to change is the thickness of the border.

Code used to make the checkbox larger:

<CheckBox
android:id="@+id/item_switch"
android:layout_width="160dp"    
android:layout_height="160dp"
android:button="@null"
android:background="?android:attr/listChoiceIndicatorMultiple"/>

From this SO answer.

Community
  • 1
  • 1

1 Answers1

0

So your code should look

<CheckBox
android:id="@+id/item_switch"
android:layout_width="wrap_content"   
android:layout_height="wrap_content"
android:button="@null"
android:background="?android:attr/listChoiceIndicatorMultiple"/>
Firefog
  • 3,094
  • 7
  • 48
  • 86
  • Right, except now the button has the default size, which brings me back to square one. I need the button to be both bigger (160dp in width and height) and have reduced border thickness. – user7089738 Oct 29 '16 at 19:17
  • I mean that I want to style the button so that it is both bigger and doesn't have such thick borders when it is bigger. – user7089738 Oct 29 '16 at 19:23
  • @user7089738 http://stackoverflow.com/questions/26346727/android-material-design-button-styles?answertab=oldest#tab-top – Firefog Oct 29 '16 at 19:26
  • Am I correct in concluding that I will have to make my own custom images for the checkbox to get the look I want? – user7089738 Oct 29 '16 at 19:40