开发者社区> 问答> 正文

关于安卓checkbox的背景设置

为什么checkbox的背景设置为白色图片了,但是还是显示有方框,我想把方框去掉怎么去,我的代码如下;
<?xml version="1.0" encoding="utf-8"?>

xml里面的checkbox如下:

 <?xml version="1.0" encoding="utf-8"?>
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
 android:descendantFocusability="blocksDescendants" >
 android:layout_width="match_parent"
 android:layout_height="@dimen/list_item_height"
 android:layout_marginLeft="@dimen/margin_width" >
 android:id="@+id/name"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:layout_centerVertical="true"
 android:text="张无忌"
 android:textColor="@color/blackf"
 android:textSize="@dimen/list_item_size" />
 android:id="@+id/xuanze"
 android:layout_width="16dp"
 android:layout_height="16dp"
 android:layout_alignParentRight="true"
 android:layout_centerVertical="true"
 android:layout_marginRight="@dimen/margin_width"
 android:background="@drawable/checkbox_selector_hangye"
 android:clickable="false" />

出来的图片还是这样,,,,,,,我想把那个方框去掉(没有选择的情况下)
screenshot

展开
收起
爵霸 2016-03-12 11:06:05 1915 0
1 条回答
写回答
取消 提交回答
  • android:button="@null"

    2019-07-17 19:00:28
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
58同城Android客户端Walle框架演进与实践之路 立即下载
Android组件化实现 立即下载
蚂蚁聚宝Android秒级编译——Freeline 立即下载