gpt4 book ai didi

java - 增加复选框中复选框的大小

转载 作者:行者123 更新时间:2023-12-01 12:56:52 24 4
gpt4 key购买 nike

我想增加复选框中支票的大小。我想为新支票添加图像。但我在 XML 中没有看到任何用于更改复选框检查的选项。是否有我缺少的 XML 选项或将新的支票图像添加到 java 的方法。

最佳答案

<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/checkbox" android:state_checked="false"/>
<item android:drawable="@drawable/checkboxselected" android:state_checked="true"/>
<item android:drawable="@drawable/checkbox"/>

将其添加到 xml 中的复选框

 <CheckBox
android:layout_width="match_parent"
android:layout_height="wrap_content"
**android:button="@drawable/checkbox_selector"**
android:text="CheckBox"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/Black" />

关于java - 增加复选框中复选框的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23812292/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com