android - Using drawable resources -
i have problem, see trace stack:
e/androidruntime(2410): caused by: org.xmlpull.v1.xmlpullparserexception: binary xml file line #5: <bitmap> requires valid src attribute
my xml file looks like:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item> <bitmap android:src="@drawable/btn_1"/> </item> </layer-list>
btn_1 xml file in drawable resources when i'm using image(*.png) instead of xml drawable it's ok.
can use drawable resource src bitmap? in case here btn_1.xml file. doesn't work if btn_1 file have no items.
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:drawable="@drawable/btn_arrow_bg_red"/> <item> <bitmap android:gravity="center" android:src="@drawable/btn_arrow_white" /> </item> </layer-list>
you cant have xml drawable source bitmap. because example if possible, mistakenly create black-hole calling xml itself.
lets suppose, have xml drawable a has bitmap whos source drawable b. in drawable b, has bitmap whos source drawable a. create circular loop cant resolved. why need provide image source bitmap avoid confusion
Comments
Post a Comment