Hello I build a widget and it contains an imageview for title and content divider
well just like always I imported my image to the drawable folder
i declared the image on my widget xml layout like this:
<ImageView
android:id="@+id/img_widget"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:layout_marginBottom="10dip"
android:gravity="center_vertical|center_horizontal"
android:src="@drawable/divider"/>
it’s divider.9.png at my drawable folder
so, when i start to compile this it turns out error
not at the xml file but at the image itself
and when i looked at the console it says:
ERROR: Failure processing PNG image /home/drikvi/workspace/AnimList/res/drawable-hdpi/divider.9.png
[2011-06-23 15:18:59 - AnimList] W/ResourceType( 2305): Bad XML block: header size 2433 or total size 0 is larger than data size 0
[2011-06-23 15:18:59 - AnimList] W/ResourceType( 2305): Bad XML block: header size 2433 or total size 0 is larger than data size 0
i really have no idea with this?
any solutions?
I suspect that your image is not a 9-patch and it should be if it has the
.9.pngextension. Try renaming it todivider.pngand see if that works.