How to remove padding around Android CheckBox

There's now a better way of doing this:

android:minWidth="0dp"
android:minHeight="0dp"

You could use a negative margin.

android:layout_marginTop = "-5dp"
android:layout_marginRight = "-5dp"

To remove radio button default margins or padding in android

if you using xml

android:minWidth="0dp"
android:minHeight="0dp"

if using programmatically

 radiobtn.setMinimumHeight(0);
 radiobtn.setMinimumWidth(0);

This works for me in Constraint Layout. I hope it will work for another layout.

<androidx.appcompat.widget.AppCompatCheckBox
                ...
                android:translationX="-5dp"
                 />