首页 > RadioButton 背景图片在android studio里面显示不出来

RadioButton 背景图片在android studio里面显示不出来

大家好,我遇到一个问题,我在android studio里面设置一个RadioButton的背景,用了一个selector来实现,我在预览的时候图片却显示不出来

我的这个RadioButton 是这样写的:

       <RadioButton
        android:layout_gravity="bottom"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:checked="true"
        android:background="@drawable/waimai_tab_home_selector"
        android:text="@string/icon_buy"
        />    

waimai_tab_home_selector.xml

<?xml version="1.0" encoding="utf-8"?>

<selector xmlns:android="http://schemas.android.com/apk/res/android">

<item android:drawable="@drawable/tab_icon_home_selected" android:state_pressed="true" />
<item android:drawable="@drawable/tab_icon_home_selected" android:state_checked="true" />
<item android:drawable="@drawable/tab_icon_home" />

</selector>

首先申明我的图片是存在的,请问这究竟是什么原因?
求好心人回答,谢谢。


此问题我已经解决了,不知道为何为这样,昨天打开android studio,他就图标显示正常了,真诡异……

【热门文章】
【热门文章】