0
我创建了自己的选择器到复选框,但无法更改它的大小。如果我将layout_height从wrap_content设置为20dp,行高变小,但复选框的大小保持不变,导致彼此重叠。如果我用layout_height和width设置了android:height =“20dp”和android:width =“20dp”,则没有任何反应。为什么?Android调整大小复选框
<?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/cbon" />
<item android:state_checked="false" android:drawable="@drawable/cboff" />
</selector>
<CheckBox
android:id="@+id/multiple_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_gravity="center_vertical"
android:checked="true"
android:button="@drawable/productlists_custom_cb"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false" />
你的意思是我应该在我创建它们的图像编辑器中将复选框图像的大小调整为较小的值?我做到了,它的工作原理,但我不明白为什么我不能在android中调整它们的大小。 – erdomester 2012-03-30 16:06:54