作者issuemylove (skill)
看板AndroidDev
标题[问题] 9 patch 失败
时间Tue Dec 4 18:11:40 2012
各位大大好
今天我试了 9 patch
我将 9 patch 的图设为背景
结果如
图一
http://ppt.cc/yiNG (实际情况: 9 patch 用的左上pixel未消失)
但是理想中应该是要跟图二一样
图二
http://ppt.cc/wl9a (理想状况:程式中 Graphical layout 的预览)
所以我失败了QQ|||
我是用<sdk>\tool\Draw9Patch.bat 的程式制作图片的
可以请教发生了甚麽问题吗? T_T
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 118.163.3.187
※ 编辑: issuemylove 来自: 118.163.3.187 (12/04 18:20)
1F:→ asilzheng:个人感觉 你画这麽多段 是要程式怎麽办? 12/04 21:43
2F:→ issuemylove:因为图片很单纯所以我想要放大的时候 图片的线条 12/05 01:39
3F:→ issuemylove:部分线条也放大 12/05 01:39
4F:→ issuemylove:所以画了许些段 12/05 01:40
5F:→ issuemylove:QQ 可是应该不是很多段的问题吧? 12/05 01:40
6F:→ KeySabre:不能那麽多段 请google android Draw 9-patch 12/05 13:09
以下是 摘自 android Draw 9-patch 官方网站原文
http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch
The border is used to define the stretchable and static areas of the image.
You indicate a stretchable section by drawing one (or more) 1-pixel-wide
black line(s) in the left and top part of the border (the other border pixels
should be fully transparent or white).
You can have as many stretchable
sections as you want: their relative size stays the same, so the largest
sections always remain the largest.
我看内容它说多段是ok的呀QQ? 还是我对网站内容有误会或是漏看的地方?
我再回去看了两遍
http://developer.android.com/tools/help/draw9patch.html
文中似乎没有看到有写甚麽特别限制的地方QQ||| 不然就是我漏看orz
※ 编辑: issuemylove 来自: 118.163.3.187 (12/05 13:55)
7F:→ issuemylove:另外我试了一下只有一、二段的就ok 12/05 14:05
8F:→ issuemylove:所以真的是多段的问题罗? QQ 12/05 14:05
9F:推 lovelycateye:y轴你点的没问题,x轴也要订要延伸的部分才行 12/06 14:17
10F:→ lovelycateye:喔 我漏看了,你有做。那你看看你的图片本身大小吧 12/06 14:18
11F:→ lovelycateye:不然我猜是你点的太复杂? 12/06 14:19