I have a simple default checkbox in android app:
<CheckBox
android:id="@+id/sklad"
android:layout_below="@id/barcode_text"
android:layout_toLeftOf="@+id/skladlabel"
android:layout_centerVertical="true"
android:gravity="center"
android:checked="true"
android:layout_width="48dp"
android:layout_height="48dp"
/>
However I have problems with alignment of the checkbox - as you can see, it is not centered in its view. I set the layout width to 48dp, because if I leave it as wrap_content, it says touch size too small.
So with this it looks good:
android:layout_width="wrap_content"
android:layout_height="wrap_content"
But with 48dp width it looks like this:
So I just need to center it in its view and that way it will be closer to the text.



You can't change CheckBox's button size (yes it is
buttonproperty) by changing the layout's width and height. Maybe you can usescaleXandscaleYproperties but they may not give you what you actually want.Maybe you should consider using a custom checkbox.
See here: Custom checkbox image android