安卓/ 9补丁PNG:什么,如果我需要不服像11补丁PNG? [英] Android / 9-patch PNG: What, if I need smth like a 11-patch PNG?

查看:225
本文介绍了安卓/ 9补丁PNG:什么,如果我需要不服像11补丁PNG?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在画9补丁,一切都看起来很好。 然而,我的SDK说,9补丁PNG格式不正确。因为我有像11补丁PNG。因为我不希望小敛区域进行缩放。如何获得它的工作?屏幕截图描述的一切:

在控制台错误Meassage:

  ERROR:9片图像/res/drawable-hdpi/top_complete.9.png畸形。
        不能有沿边缘不止一个显着的区域。
        在像素#10沿底部边缘发现。
错误:未能处理PNG图像/res/drawable-hdpi/top_complete.9.png
 

解决方案

我相信你的问题是,你正在分裂的内容区域分成这是不允许的两件。顶部和左边框是由比底部和右侧边框工具区别对待。顶部和左侧描述什么是可拉伸的,底部和右侧定义内容区域(其必须是连续的)。

选中该复选框,显示内容区域并使用它,看看我说的。

In Draw 9-patch, everything looks fine. However, my SDK says the 9-patch png is malformed. Because I have something like an 11-patch png. Because I don't want the little grabbing area to be scaled. How to get it working? The screenshot describes everything:

Error Meassage in Console:

ERROR: 9-patch image /res/drawable-hdpi/top_complete.9.png malformed.
        Can't have more than one marked region along edge.
        Found at pixel #10 along bottom edge.
ERROR: Failure processing PNG image /res/drawable-hdpi/top_complete.9.png

解决方案

I believe your issue is that you're splitting the content area into two pieces which is not allowed. The top and left borders are treated differently by the tool than the bottom and right borders. The top and left describe what is stretchable, the bottom and right define content area (which must be contiguous).

Check the checkbox to show content area and play with it to see what I'm talking about.

这篇关于安卓/ 9补丁PNG:什么,如果我需要不服像11补丁PNG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆