我想创建一个形状:solid 是 Bitmap(重复图块),stroke 是一种颜色。我使用图层列表:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:id="@+id/additional_image"
android:drawable="@drawable/bg_detail_loop"
>
</item>
<item android:id="@+id/rounded_corners"
android:drawable="@drawable/shape_box_dlg">
</item>
</layer-list>
文件 bg_detail_loop.xml:
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:filter="true"
android:gravity="center"
android:tileMode="repeat"
android:src="@drawable/tile_detail"
/>
文件 shape_box_dlg.xml:
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<stroke
android:width="2dip"
android:color="#EE6A1F" />
<gradient android:angle="270" />
<corners android:radius="6dp" />
</shape>
但是,在角落里,背景位图没有剪辑。我想转角。有人帮我吗?谢谢