2010-10-11 76 views
5

如何使用中風

設置不同的顏色矩形的邊框怎麼樣,如果只是用筆畫獲得上邊框或左邊框。是否有可能爲不同的邊框設置不同的寬度

+0

你需要添加一些更多的細節問題。 「使用中風」是什麼意思?你在Android上標記它,這意味着你正在Android上顯示一些東西? OpenGL的? – 2010-10-12 00:16:42

回答

8
<?xml version="1.0" encoding="utf-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" 
android:shape="rectangle" android:padding="10dp"> 
<solid android:color="#FAFAFA"/> 
<stroke android:width="1px" android:color="#cccccc" /> 
<corners android:bottomRightRadius="10dp" android:bottomLeftRadius="10dp" 
    android:topLeftRadius="0dp" android:topRightRadius="0dp" 
/> 

</shape> 

希望你能看到我使用的xml。謝謝

+0

它是否也爲矩形的不同邊使用不同的顏色? – 2015-10-19 07:15:59