9补丁填充区域与多尺度领域工作 [英] 9 patch fill area not working with multiple scale areas

查看:203
本文介绍了9补丁填充区域与多尺度领域工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我9补丁我添加了一个填充区域要采取最宽的,并从红色矩形下面的内容。然而,随着规模的图像显示,它不工作。如果我删除箭头所示规模区域,然后它完美的作品。

In my 9 patch I've added a fill area to be the contents taking most of the width and from below the red rectangle. However as the scale images show it's not working. If I remove the scale area shown by the arrow then it works perfectly.

我是什么做错了或不理解约9补丁?

What am I doing wrong or not understanding about 9 patch?

感谢。

推荐答案

我发现了一个相关答案完全解释这对我来说:

I found a related answer that explains it perfectly for me:

  • Android nine-patch content-border not honoured

内容区域由右和下杆如上所述定义
  以上,但你真正定义是填充
  (顶部,左侧,底部和右侧填充)。

The content region is defined by the right and lower bars as mentioned above, but what you are really defining is the padding (top,left,bottom and right padding).

所以认为它在填充围绕内容面积计算,由白色像素的定义。

So think of it in terms of "padding" around the content area, as defined by the white pixels.

查看链接的答案更详细。

Check out the linked answer for more detail.

这篇关于9补丁填充区域与多尺度领域工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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