I am using image for checkbox. This is the xml i am uisng,
<CheckBox
android:id="@+id/remember"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tableLayout1"
android:button="@drawable/checkbox_selector"
android:layout_marginLeft="52dp"
android:text="@string/remember"
android:textColor="#000000" />
I am getting the gap between the image and text ( see in the below image), is it default; is it possible to change if yes let me know what property i have to add.
checkbox_selector.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true"
android:drawable="@drawable/checked" />
<item android:state_checked="false"
android:drawable="@drawable/un_checked" />
</selector>
For IE, you need to set the height to remove the space between checkboxes. Show activity on this post. This is using a doctype of HTML 4.01 strict. if you want side-by-side borders for the checkboxes, use a height of 13px.
Use margin-right .
If the intent of the user is to bring some more space between check box "box" and its corresponding text, you can use "&npsp;" in the Text content of the checkbox. Hope that helps.
Checkbox inputs need to align vertically with the label text similarly (if not identically) across all browsers. If the label text wraps, it needs to be indented (so no wrapping down underneath the checkbox).
Try messing with the android:paddingLeft property of the checkbox.
See this post for further information: Android - Spacing between CheckBox and text
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With