Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个在 Android v2.2 中运行良好的 9 补丁文件,但是当我在 ICS 模拟器上运行该应用程序时,它默认为拉伸比例。查看这些屏幕截图:
以前有人遇到过这个问题吗?
不确定这是否有用,但我曾经在 2.3.3 中看到过类似的问题。我刚刚在 Eclipse 中进行了清理并重建了应用程序。之后,9-patch画出了正确的方法。
由于新的硬件加速渲染管道,ICS 对 9 补丁有点挑剔。特别是,如果补丁的不可压缩部分大于您尝试绘制它的区域,则可能会发生奇怪的事情。
你能提供你在这个例子中使用的 .9.png 吗?