有什么办法来定义一个梯度的顶部和底部的行程,或创建一个复合形状绘制?:可绘制矩形形状,指定顶部和底部笔触颜色?
// 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