看板 AndroidDev 關於我們 聯絡資訊
各位大大好 今天我試了 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)
asilzheng:個人感覺 你畫這麼多段 是要程式怎麼辦? 12/04 21:43
issuemylove:因為圖片很單純所以我想要放大的時候 圖片的線條 12/05 01:39
issuemylove:部分線條也放大 12/05 01:39
issuemylove:所以畫了許些段 12/05 01:40
issuemylove:QQ 可是應該不是很多段的問題吧? 12/05 01:40
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)
issuemylove:另外我試了一下只有一、二段的就ok 12/05 14:05
issuemylove:所以真的是多段的問題囉? QQ 12/05 14:05
lovelycateye:y軸你點的沒問題,x軸也要訂要延伸的部分才行 12/06 14:17
lovelycateye:喔 我漏看了,你有做。那你看看你的圖片本身大小吧 12/06 14:18
lovelycateye:不然我猜是你點的太複雜? 12/06 14:19