288

Is there an easy way to add padding between the checkbox in a CheckBox control, and the associated text?

I cannot just add leading spaces, because my label is multi-line.

As-is, the text is way too close to the checkbox: alt text

DougW
  • 28,776
  • 18
  • 79
  • 107
  • 1
    A simple solution would be using a `TextView` with `drawableLeft` and use `drawablePadding` to give space to text. In code just toggle selected and unselected states. – Muhammad Babar Mar 18 '14 at 06:53
  • I just noticed a new xml attribute called android:drawablePadding, which is supposed to set the spacing between the drawable and the text. I didn't try it but I think it's google's "after-the-fact" fix for this problem. – Peri Hartman Aug 13 '15 at 16:07
  • http://stackoverflow.com/a/35572204/2219406 – Mohamed Ibrahim Dec 21 '16 at 04:54

32 Answers32

355

I hate to answer my own question, but in this case I think I need to. After checking it out, @Falmarri was on the right track with his answer. The problem is that Android's CheckBox control already uses the android:paddingLeft property to get the text where it is.

The red line shows the paddingLeft offset value of the entire CheckBox

alt text

If I just override that padding in my XML layout, it messes up the layout. Here's what setting paddingLeft="0" does:

alt text

Turns out you can't fix this in XML. You have do it in code. Here's my snippet with a hardcoded padding increase of 10dp.

final float scale = this.getResources().getDisplayMetrics().density;
checkBox.setPadding(checkBox.getPaddingLeft() + (int)(10.0f * scale + 0.5f),
        checkBox.getPaddingTop(),
        checkBox.getPaddingRight(),
        checkBox.getPaddingBottom());

This gives you the following, where the green line is the increase in padding. This is safer than hardcoding a value, since different devices could use different drawables for the checkbox.

alt text

UPDATE - As people have recently mentioned in answers below, this behavior has apparently changed in Jelly Bean (4.2). Your app will need to check which version its running on, and use the appropriate method.

For 4.3+ it is simply setting padding_left. See htafoya's answer for details.

Lovis
  • 9,513
  • 5
  • 31
  • 47
DougW
  • 28,776
  • 18
  • 79
  • 107
  • 123
    Nothing wrong with answering your own question - someone else will probably have this problem in the future and you just gave a good, comprehensive answer. – AndrewKS Oct 27 '10 at 22:23
  • 5
    What's wrong with just setting `paddingLeft="48sp"`? Works fine here, even if I change scale and orientation. Your code gave me erratic padding values over a list of items. – harpo Mar 28 '11 at 19:30
  • 5
    @harpo - You have no guarantees that different device manufacturers won't use different graphics for the checkbox, meaning your hard-coded padding may break your visual layout on different devices. Since I'm reading the current padding and adding to it that won't be a problem, but you do have to make sure you only do it once. – DougW Mar 29 '11 at 01:36
  • @DougW - but if they used a different graphic the android source would still be 45dip? – Blundell May 20 '11 at 10:05
  • 2
    @Blundell - Not necessarily. Android's open source. A device vendor could substitute a totally different graphic with a totally different size. They love doing stuff like that for some reason. – DougW May 20 '11 at 19:17
  • awesome writeup for the solution! Instead of adding 0.5f I used the following equation: (int)Math.round(fCheckboxPaddingBeforeTextDIP * fScale) – Someone Somewhere Jun 01 '11 at 21:01
  • 2
    Unfortunately, you can't use this solution in `getView()` of custom Adapter (if you recycle your views), since padding will increase endlessly. To fix this problem I had to use something like this: `boolean isHackNeeded = Build.VERSION.SDK_INT < 17; float scale = context.getResources().getDisplayMetrics().density; if (isHackNeeded) {CheckBox rb = new CheckBox(context); this.PADDING = rb.getPaddingLeft() + Math.round(10.0f * scale); } else { this.PADDING = Math.round(10.0f * scale); }`. And then use `PADDING` for every CheckBox I inflate: `check.setPadding(PADDING, check.getPaddingTop() ...` – Alex Semeniuk May 08 '13 at 13:33
  • how to left pad the drawable? – Preetam Jun 21 '13 at 12:57
  • One lesson: Don't just view in Jelly Bean after setting checkbox padding. Better yet, don't unconditionally set a checkbox's left padding. – Jerry101 Jun 20 '14 at 22:26
  • 1
    Thanks for nice descriptive answer, but this is not working for me. I am getting proper text and checkbox in one device. While in another, text is overlapping the checkbox. And this code doesn't make any difference :( – MysticMagicϡ Jun 25 '14 at 10:36
  • A tiny issue with the code: if it gets called repeatedly (e.g. onResume), the spacing goes awry. This is because checkBox.getPaddingLeft() retrieves the previously "corrected" spacing, then adds to it. In effect, repeated calls to the code gradually increase the spacing. – RudyF Dec 30 '16 at 12:06
  • Hey what if I want to add padding to the left of the checkbox itself, and not between it and the text? – android developer Aug 07 '19 at 07:29
  • Simple solution would be this, you need to create a drawable for the button. – Naveen rana Sep 28 '22 at 14:01
156

Given @DougW response, what I do to manage version is simpler, I add to my checkbox view:

android:paddingLeft="@dimen/padding_checkbox"

where the dimen is found in two values folders:

values

<resources>

    <dimen name="padding_checkbox">0dp</dimen>

</resources>

values-v17 (4.2 JellyBean)

<resources>

    <dimen name="padding_checkbox">10dp</dimen>

</resources>

I have a custom check, use the dps to your best choice.

htafoya
  • 18,261
  • 11
  • 80
  • 104
  • 2
    This is the best answer so far. although, it should really be `values-v17`as the fix was introduced in API 17 (according to some posts above) – icecreamman Jan 22 '14 at 06:11
  • A perfect answer, just for older apis (values/dimens) I set padding_checkbox to 0dip (on API 10 margin is huge already) and for values-v17 10dip as htafoya suggested. – Yar Apr 30 '16 at 17:59
77

Use attribute android:drawableLeft instead of android:button. In order to set padding between drawable and text use android:drawablePadding. To position drawable use android:paddingLeft.

<CheckBox
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:button="@null"
        android:drawableLeft="@drawable/check_selector"
        android:drawablePadding="-50dp"
        android:paddingLeft="40dp"
        />

result

Roman Trokhymets
  • 1,102
  • 10
  • 10
  • 1
    Hi , This is nice method but notice that u get extra left margin bcoz of the default image of checkbox .. any solutions for that – Code_Life Jan 23 '13 at 06:03
  • 4
    set `android:background="@android:color/transparent"` and left margin will dissapear – madeuz Jun 06 '13 at 06:08
  • 2
    The code above worked perfectly for my radio buttons, and is consistent across the 4.2 OS boundary. Thanks! – gnichola Sep 30 '13 at 14:11
  • 1
    This should be ranked much higher. As @gnichola said, this works across Android versions and is quite a clean solution. Create a style and assign it in your theme like this : `@style/CheckBox` That way, you have the style defined once and referenced once only. – Rosomack Aug 22 '14 at 13:55
  • 1
    Also set background to null (or something custom), otherwise lollipop+ gets a massive circle ripple effect encompassing the entire view. You can use a v21 button drawable utilising the tags for to put a more appropriate ripple back in. – Tom Feb 03 '15 at 19:56
34

Android 4.2 Jelly Bean (API 17) puts the text paddingLeft from the buttonDrawable (ints right edge). It also works for RTL mode.

Before 4.2 paddingLeft was ignoring the buttonDrawable - it was taken from the left edge of the CompoundButton view.

You can solve it via XML - set paddingLeft to buttonDrawable.width + requiredSpace on older androids. Set it to requiredSpace only on API 17 up. For example use dimension resources and override in values-v17 resource folder.

The change was introduced via android.widget.CompoundButton.getCompoundPaddingLeft();

Lance Roberts
  • 22,383
  • 32
  • 112
  • 130
kotucz
  • 1,190
  • 13
  • 13
  • 4
    It's the only correct answer here - it pinpoints the problem and provides simple solutions, which I've used successfully in multiple commercial apps. – madej Mar 24 '14 at 21:43
  • 1
    How do you get buttonDrawable.width in XML or do you hard code it? – Jared Kells May 28 '14 at 06:35
  • 1
    I managed to fix this issue in an old code by removing `android:background="@android:color/transparent"`. – Sebek Jun 11 '14 at 08:53
  • The accepted answer is nice and working, but this one is simple and effective. This should be accepted answer. – Reaz Murshed Aug 25 '15 at 05:24
32

Yes, you can add padding by adding padding.

android:padding=5dp

Falmarri
  • 47,727
  • 41
  • 151
  • 191
  • 5
    This actually works... sort of. For one, only paddingLeft is needed, not all padding. However, it looks like the paddingLeft is already set to a value of around 40dp. If I set it > 40dp it moves away, if I set it < 40dp it moves under the checkbox. I'm going to mark this as correct and open another question, because I have concerns about that. – DougW Oct 27 '10 at 21:56
  • Well I have no idea without seeing your layout. – Falmarri Oct 27 '10 at 21:59
  • yes not working..particularly samsung device I got problem. – Ranjithkumar Oct 26 '15 at 06:03
  • 1
    Adding padding by adding padding sounds legit! – Sermilion Feb 01 '18 at 18:12
  • plus one for saving my day @Falmarri – Ravi Vaniya Jan 28 '23 at 16:29
24

If you want a clean design without codes, use:

<CheckBox
   android:id="@+id/checkBox1"
   android:layout_height="wrap_content"
   android:layout_width="wrap_content"
   android:drawableLeft="@android:color/transparent"
   android:drawablePadding="10dp"
   android:text="CheckBox"/>

The trick is to set colour to transparent for android:drawableLeft and assign a value for android:drawablePadding. Also, transparency allows you to use this technique on any background colour without the side effect - like colour mismatch.

ChuongPham
  • 4,761
  • 8
  • 43
  • 53
17

API 17 and above, you can use:

android:paddingStart="24dp"

API 16 and below, you can use:

android:paddingLeft="24dp"

Inmer
  • 171
  • 1
  • 6
  • 1
    Very good answer. I can't imagine how the padding will give the space between check box and text. Usually Padding Left mean left of the component. – Mohamed Ibrahim Dec 21 '16 at 04:54
16

In my case I solved this problem using this following CheckBox attribute in the XML:

*

android:paddingLeft="@dimen/activity_horizontal_margin"

*

Mohammad Zakaria
  • 325
  • 4
  • 11
  • Very good answer. I can't imagine how the padding will give the space between check box and text. Usually Padding Left mean left of the component. – Mohamed Ibrahim Dec 21 '16 at 04:53
15

Simple solution, add this line in the CheckBox properties, replace 10dp with your desired spacing value

android:paddingLeft="10dp"
Naveed Ahmad
  • 6,627
  • 2
  • 58
  • 83
11

I don't know guys, but I tested

<CheckBox android:paddingLeft="8mm" and only moves the text to the right, not entire control.

It suits me fine.

Tiago
  • 1,116
  • 5
  • 25
  • 39
  • 1
    I haven't tried this recently, so it's certainly possible that this works on a specific device, or a newer Android OS version. I would highly recommend that you test on different setups though, because this definitely did not work at the time I asked this question. – DougW Sep 14 '11 at 20:38
  • I'm seeing this behave differently between 2.3.3 and 4.2 (not sure where in between the change occurred). – Nate Feb 21 '13 at 02:08
  • Do you mean dp not mm? – Chrispix Nov 21 '14 at 18:36
10

For space between the check mark and the text use:

android:paddingLeft="10dp"

But it becomes more than 10dp, because the check mark contains padding (about 5dp) around. If you want to remove padding, see How to remove padding around Android CheckBox:

android:paddingLeft="-5dp"
android:layout_marginStart="-5dp"
android:layout_marginLeft="-5dp"
// or android:translationX="-5dp" instead of layout_marginLeft
CoolMind
  • 26,736
  • 15
  • 188
  • 224
  • how to add padding at the end of text? Using margin_end makes the background not filled. – Hai Hack Jul 28 '21 at 04:37
  • @HaiHack, does `paddingRight` work? I [saw](https://android--code.blogspot.com/2015/08/android-checkbox-padding.html) that it worked. – CoolMind Jul 28 '21 at 06:40
  • Sorry, I mean adding the space before the checkbox @CoolMind – Hai Hack Jul 28 '21 at 07:18
  • @HaiHack, I see two options. 1) Extend `CheckBox` and do this programmatically. 2) Add `FrameLayout` over `CheckBox` with left padding. – CoolMind Jul 28 '21 at 09:38
  • 1
    please see my answer for better sollution @CoolMind https://stackoverflow.com/a/68556814/5157066 – Hai Hack Jul 28 '21 at 09:41
  • @HaiHack, thank you! I remembered about this attribute, but thought it couldn't help. :) – CoolMind Jul 28 '21 at 10:03
9

Why not just extend the Android CheckBox to have better padding instead. That way instead of having to fix it in code every time you use the CheckBox you can just use the fixed CheckBox instead.

First Extend CheckBox:

package com.whatever;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.CheckBox;

/**
 * This extends the Android CheckBox to add some more padding so the text is not on top of the
 * CheckBox.
 */
public class CheckBoxWithPaddingFix extends CheckBox {

    public CheckBoxWithPaddingFix(Context context) {
        super(context);
    }

    public CheckBoxWithPaddingFix(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    public CheckBoxWithPaddingFix(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public int getCompoundPaddingLeft() {
        final float scale = this.getResources().getDisplayMetrics().density;
        return (super.getCompoundPaddingLeft() + (int) (10.0f * scale + 0.5f));
    }
}

Second in your xml instead of creating a normal CheckBox create your extended one

<com.whatever.CheckBoxWithPaddingFix
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Hello there" />
w.donahue
  • 10,790
  • 13
  • 56
  • 78
7

Setting minHeight and minWidth to 0dp was the cleanest and directest solution for me on Android 9 API 28:

<CheckBox
        android:id="@+id/checkbox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:minHeight="0dp"
        android:minWidth="0dp" />
ManuelTS
  • 316
  • 4
  • 14
6

I just concluded on this:

Override CheckBox and add this method if you have a custom drawable:

@Override
public int getCompoundPaddingLeft() {

    // Workarround for version codes < Jelly bean 4.2
    // The system does not apply the same padding. Explantion:
    // http://stackoverflow.com/questions/4037795/android-spacing-between-checkbox-and-text/4038195#4038195

    int compoundPaddingLeft = super.getCompoundPaddingLeft();

    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
        Drawable drawable = getResources().getDrawable( YOUR CUSTOM DRAWABLE );
        return compoundPaddingLeft + (drawable != null ? drawable.getIntrinsicWidth() : 0);
    } else {
        return compoundPaddingLeft;
    }

}

or this if you use the system drawable:

@Override
public int getCompoundPaddingLeft() {

    // Workarround for version codes < Jelly bean 4.2
    // The system does not apply the same padding. Explantion:
    // http://stackoverflow.com/questions/4037795/android-spacing-between-checkbox-and-text/4038195#4038195

    int compoundPaddingLeft = super.getCompoundPaddingLeft();

    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
        final float scale = this.getResources().getDisplayMetrics().density;
        return compoundPaddingLeft + (drawable != null ? (int)(10.0f * scale + 0.5f) : 0);
    } else {
        return compoundPaddingLeft;
    }

}

Thanks for the answer :)

PaNaVTEC
  • 2,505
  • 1
  • 23
  • 36
5

only you need to have one parameter in xml file

android:paddingLeft="20dp"
tej shah
  • 2,995
  • 2
  • 25
  • 35
4

This behavior appears to have changed in Jelly Bean. The paddingLeft trick adds additional padding, making the text look too far right. Any one else notice that?

extreme
  • 131
  • 1
  • 3
2

If you have custom image selector for checkbox or radiobutton you must set same button and background property such as this:

            <CheckBox
                android:id="@+id/filter_checkbox_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:button="@drawable/selector_checkbox_filter"
                android:background="@drawable/selector_checkbox_filter" />

You can control size of checkbox or radio button padding with background property.

Ilya Lisway
  • 405
  • 4
  • 5
  • No, you do not have to do this. This is not acceptable if you have a custom background that's different from the checkbox/radiobutton glyph. – andr Jan 24 '13 at 12:58
2
<CheckBox
        android:paddingRight="12dip" />
AndrewKS
  • 3,603
  • 2
  • 24
  • 33
  • @AndrewKS - Tested. As expected, this adds padding to the entire control, not in between the checkbox and the text. – DougW Oct 27 '10 at 21:48
  • You are probably better off having the text in a separate TextView. – AndrewKS Oct 27 '10 at 21:50
  • @AndrewKS - Bad idea for usability. I want the user to be able to touch the text and select/deselect the checkbox. It also breaks many accessibility features, the same way as if you do that in a web page. – DougW Oct 27 '10 at 21:52
  • `Bad idea for usability` No it's not. Put both the checkbox and the textview in a linear layout and make that linearlayout touchable. – Falmarri Oct 27 '10 at 22:01
  • @Falmarri - I mean yeah, I could do that, but then I'm basically re-implementing my own checkbox control. I'd just rather not do that. – DougW Oct 27 '10 at 22:10
  • 1
    -1 This answer doesn't address the issue posed in the question, which is about the gap between the image and the text – David Laing Jan 02 '11 at 00:58
  • This answer was made at the time with the assumption that the checkbox and the text were in separate views. – AndrewKS Jan 04 '11 at 20:14
2

I think this can help you

<CheckBox
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:drawablePadding="-30dp"
        android:paddingLeft="30dp"
        android:drawableLeft="@drawable/check"
        />
1

What I did, is having a TextView and a CheckBox inside a (Relative)Layout. The TextView displays the text that I want the user to see, and the CheckBox doesn't have any text. That way, I can set the position / padding of the CheckBox wherever I want.

mbmc
  • 5,024
  • 5
  • 25
  • 53
1

I had the same problem with a Galaxy S3 mini (android 4.1.2) and I simply made my custom checkbox extend AppCompatCheckBox instead of CheckBox. Now it works perfectly.

Quentin G.
  • 988
  • 9
  • 15
1

@CoolMind has the nice way but it couldn't add the space at the beginning of checkbox by android:paddingLeft, instead use this way

<androidx.appcompat.widget.AppCompatCheckBox
                android:id="@+id/cbReason5"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@android:color/white"
                android:button="@null"
                android:drawableStart="@drawable/custom_bg_checkbox"
                android:drawablePadding="8dp"
                android:paddingStart="16dp"
                android:paddingTop="12dp"
                android:paddingEnd="16dp"
                android:paddingBottom="12dp"
                android:text="Whatever"
                android:textColor="@color/textNormal"
                app:buttonCompat="@null" />

android:drawablePadding should help you

Hai Hack
  • 948
  • 13
  • 24
1

if some one need padding around drawable try this

        <com.google.android.material.checkbox.MaterialCheckBox
        android:id="@+id/checkbox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:button="@null"
        android:drawableStart="@drawable/button_selector"
        android:padding="@dimen/items_padding" />
RasenKoD
  • 21
  • 2
1

If you are creating custom buttons, e.g. see change look of checkbox tutorial

Then simply increase the width of btn_check_label_background.9.png by adding one or two more columns of transparent pixels in the center of the image; leave the 9-patch markers as they are.

0

You need to get the size of the image that you are using in order to add your padding to this size. On the Android internals, they get the drawable you specify on src and use its size afterwards. Since it's a private variable and there are no getters you cannot access to it. Also you cannot get the com.android.internal.R.styleable.CompoundButton and get the drawable from there.

So you need to create your own styleable (i.e. custom_src) or you can add it directly in your implementation of the RadioButton:

public class CustomRadioButton extends RadioButton {

    private Drawable mButtonDrawable = null;

    public CustomRadioButton(Context context) {
        this(context, null);
    }

    public CustomRadioButton(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public CustomRadioButton(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        mButtonDrawable = context.getResources().getDrawable(R.drawable.rbtn_green);
        setButtonDrawable(mButtonDrawable);
    }

    @Override
    public int getCompoundPaddingLeft() {
        if (Util.getAPILevel() <= Build.VERSION_CODES.JELLY_BEAN_MR1) {
            if (drawable != null) {
                paddingLeft += drawable.getIntrinsicWidth();
            }
        }
        return paddingLeft;
    }
}
0

As you probably use a drawable selector for your android:button property you need to add android:constantSize="true" and/or specify a default drawable like this:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" android:constantSize="true">
  <item android:drawable="@drawable/check_on" android:state_checked="true"/>
  <item android:drawable="@drawable/check_off"/>
</selector>

After that you need to specify android:paddingLeft attribute in your checkbox xml.

Cons:

In the layout editor you will the text going under the checkbox with api 16 and below, in that case you can fix it by creating you custom checkbox class like suggested but for api level 16.

Rationale:

it is a bug as StateListDrawable#getIntrinsicWidth() call is used internally in CompoundButton but it may return < 0 value if there is no current state and no constant size is used.

Gianluca P.
  • 1,536
  • 15
  • 15
0

All you have to do to overcome this problem is to add android:singleLine="true" to the checkBox in your android xml layout:

<CheckBox 
   android:id="@+id/your_check_box"
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   android:singleLine="true"
   android:background="@android:color/transparent"
   android:text="@string/your_string"/>

and nothing special will be added programmatically.

Muhammed Refaat
  • 8,914
  • 14
  • 83
  • 118
0

Checkbox image was overlapping when I used my own drawables from selector, I have solve this using below code :

CheckBox cb = new CheckBox(mActivity);
cb.setText("Hi");
cb.setButtonDrawable(R.drawable.check_box_selector);
cb.setChecked(true);
cb.setPadding(cb.getPaddingLeft(), padding, padding, padding);

Thanks to Alex Semeniuk

Jaiprakash Soni
  • 4,100
  • 5
  • 36
  • 67
0

I end up with this issue by changing the images. Just added extra transparent background in png files. This solution works excellent on all the APIs.

Leo DroidCoder
  • 14,527
  • 4
  • 62
  • 54
0

Maybe it is to late, but I've created utility methods to manage this issue.

Just add this methods to your utils:

public static void setCheckBoxOffset(@NonNull  CheckBox checkBox, @DimenRes int offsetRes) {
    float offset = checkBox.getResources().getDimension(offsetRes);
    setCheckBoxOffsetPx(checkBox, offset);
}

public static void setCheckBoxOffsetPx(@NonNull CheckBox checkBox, float offsetInPx) {
    int leftPadding;
    if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN) {
        leftPadding = checkBox.getPaddingLeft() + (int) (offsetInPx + 0.5f);
    } else {
        leftPadding = (int) (offsetInPx + 0.5f);
    }
    checkBox.setPadding(leftPadding,
            checkBox.getPaddingTop(),
            checkBox.getPaddingRight(),
            checkBox.getPaddingBottom());
}

And use like this:

    ViewUtils.setCheckBoxOffset(mAgreeTerms, R.dimen.space_medium);

or like this:

    // Be careful with this usage, because it sets padding in pixels, not in dp!
    ViewUtils.setCheckBoxOffsetPx(mAgreeTerms, 100f);
Oleksandr
  • 6,226
  • 1
  • 46
  • 54
-1

Instead of adjusting the text for Checkbox, I have done following thing and it worked for me for all the devices. 1) In XML, add checkbox and a textview to adjacent to one after another; keeping some distance. 2) Set checkbox text size to 0sp. 3) Add relative text to that textview next to the checkbox.

Pankaj Deshpande
  • 502
  • 2
  • 5
  • 15
-3

<CheckBox android:drawablePadding="16dip" - The padding between the drawables and the text.