首页 新闻 赞助 找找看

安卓checkbox的背景设置

0
悬赏园豆:30 [已关闭问题] 关闭于 2016-02-29 20:42

为什么checkbox的背景设置为白色图片了,但是还是显示有方框,我想把方框去掉怎么去,我的代码如下;

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

<item android:drawable="@drawable/icon_select" android:state_checked="true"/>
  
     <item android:drawable="@drawable/baise" android:state_checked="false"/>

</selector>

 

xml里面的checkbox如下:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants" >

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/list_item_height"
android:layout_marginLeft="@dimen/margin_width" >

<TextView
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" />

<CheckBox
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" />
</RelativeLayout>

</RelativeLayout>

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

疯狂的兔子!的主页 疯狂的兔子! | 初学一级 | 园豆:171
提问于:2016-02-29 16:11
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册