开发者

Android: patch 9 file ruins main.xml

开发者 https://www.devze.com 2023-02-15 08:13 出处:网络
I have a file file1.png in my drawable folder. In main.xml I have an ImageView and display this file via the src property. That works fine. Now I copy a file file2.9.png into the drawable folder, but

I have a file file1.png in my drawable folder. In main.xml I have an ImageView and display this file via the src property. That works fine. Now I copy a file file2.9.png into the drawable folder, but I am not using this file anywhere and I am not changi开发者_如何学Pythonng anything. Now I get an error marker that tells me that main.xml cannot find a file in drawable called file1.png. After deleting file2.9.png it works again. If I would rename file2.9.png into file2.png and copy it into the drawable folder still everything works, but of course I need it as a patch 9 file.

Any idea?

Thanks, A.


Your 9-patch image is most likely invalid. Make sure that all the outermost pixels are either solid black or transparent, that your left and top edges contain no more than 2 black pixels, and that your right and bottom edges are solid lines, not split.

0

精彩评论

暂无评论...
验证码 换一张
取 消