2015-12-17 59 views
0

如何在android中的file.xml中獲取此效果?如何在android中創建形狀三角形

FirstPicture

SecondaryPicture

+5

你的意思是[Rounded Rectangles?](http://stackoverflow.com/questions/5618402/how-to-draw-rounded-rectangle-in-android-ui) – gtgaxiola

+0

是的,但我需要加入2x顏色看圖片我不現在我怎麼能做到這一點。現在我得到了這個:http://postimg.org/image/ytu1527zd/ 我需要在底部紅色圓角矩形和頂部的所有黑色圓角矩形。 – Muzzik

回答

1

使用XML層列表繪製,並把兩個矩形彼此的頂部。在xml drawable的角標記中,使用topLeftRadius,topRightRadius,bottomLeftRadius和bottomRightRadius來控制每個角是否被獨立舍入。

+0

問題解決了!謝謝你:) http://pastebin.com/gK7fMi4k – Muzzik