我正在为CheckBox小部件添加图像(而不是使用选择器在.xml文件中为单击和未单击的默认图像),但是无法将图像调整为较小的尺寸并保留其原始格式尺寸。
如何缩小图像尺寸?
我用来创建CheckBox的代码是
<CheckBox
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:button="@drawable/check_box"
android:drawablePadding="20dp"
android:text="check box text"
android:textColor="@color/labelColor" />
Run Code Online (Sandbox Code Playgroud)