有没有办法为渐变定义顶部和底部的描边,或者创建一个复合形状可绘制对象?
// 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>
我认为两者都不可能实现?
谢谢