Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove checkbox default padding

I want the checkbox to have the same alignment as the edit text below it. Setting the left padding to 0 isn't doing anything, it looks like that space is part of the component.

enter image description here

like image 846
sam winston Avatar asked Jan 20 '18 18:01

sam winston


2 Answers

Try this solution:

<CheckBox
        ...
        android:translationX="-5dp" />
like image 116
Rami El-bouhi Avatar answered Nov 07 '22 20:11

Rami El-bouhi


Try to use

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

Worked for me

like image 1
Shaheer Ghouri Avatar answered Nov 07 '22 19:11

Shaheer Ghouri