我需要创建一个使用平铺图像背景的圆角视图。我已经尝试过layer-list
,但这对我不起作用,因为bitmap
刚好放在shape
顶部,并带有圆角。请指教。与平铺背景形状的圆角
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle" android:padding="10dp">
<corners android:bottomRightRadius="12dp"
android:bottomLeftRadius="12dp"
android:topLeftRadius="12dp"
android:topRightRadius="12dp" />
</shape>
</item>
<item>
<bitmap android:src="@drawable/profile_data_background_im"
android:tileMode="repeat" />
</item>
</layer-list>
http://www.curious-creature.org/2012/12/11/android-recipe-1-image-with-rounded-corners/。 http://ruibm.com/?p=184 – Raghunandan
您是否尝试过切换图层列表中的项目? –
@Dmitry是我试图交换它们,但没有成功 – Eugene