小编all*_*oid的帖子

如何在Android中调整复选框图像的大小?

我正在为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)

xml checkbox android android-layout

1
推荐指数
2
解决办法
1725
查看次数

标签 统计

android ×1

android-layout ×1

checkbox ×1

xml ×1