有什麼辦法來定義一個梯度的頂部和底部的行程,或創建一個複合形狀繪製?:可繪製矩形形狀,指定頂部和底部筆觸顏色?
// option1:
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="#f00"
android:endColor="#0f0"
/>
<stroke
top=1dip, yellow
bottom=1dip, purple
/>
</shape>
// option2
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<shape
android:shape="rectangle"
height=1dip, color=yellow />
<gradient
android:startColor="#f00"
android:endColor="#0f0"
/>
<shape
android:shape="rectangle"
height=1dip, color=purple />
</shape>
我不認爲要麼是可能的嗎?
謝謝
看到這一點:http://stackoverflow.com/questions/1598119/is-there-an-easy-way-to-add-一個邊界到頂部和底部的一個Android視圖 – Kenumir 2013-08-13 07:01:45