九补丁图像质量差
在我的 Android 应用程序中,我想实现这种效果
考虑到我决定创建的不同分辨率和密度九个补丁的 png 文件:
当我拉伸它时,它看起来很好:
但在 Android 模拟器中它是模糊的
如您所见,质量很差。为什么?我需要做什么才能达到第一张图像的质量?
in my android app I want to achieve this kind of effect
Thinking about different resolutions and densities I decided to create a nine-patch png file:
When I stretch it it looks quite fine:
But in the android simulator it is blurred
As you can see the quality is bad. Why? What do I have to do to achieve the quality from the first image?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,您应该为 ldpi、mdpi、hdpi 屏幕提供不同的 9 补丁。然后在manifest文件中写入这个标签:
然后android将采取适当的drawable并且不会模糊它。
First of all you should provide different 9-patches for ldpi, mdpi, hdpi screens. Then write in manifest file this tag:
Then android will take appropriate drawable and will not blur it.