我正在使用图像复选框。 这是XML我是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" />
我得到的图像和文字(见下面的图片中)之间的差距,是默认值; 是否有可能改变,如果是的话让我知道我必须添加什么属性。
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>
哪种布局您正在使用?假设您使用相对(或)线性布局,请检查您使用的填充项是什么。通过调整填充,我想你可以解决这个问题。 – kosa 2012-02-10 04:30:54
我正在使用相对布局,但没有填充该布局.. – 2012-02-10 04:33:46
添加文本视图的定义 – 2012-02-10 04:40:24