I'm trying to create a background for my LinearLayout that has an Image with rounded corners. I've seen many examples how to do that but not exactly what I want. In most of cases I've seen people using padding to create it, but when I do this it draws a kind of border, and I don't want any border, just the rounded corner
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item >
<shape>
<corners android:topLeftRadius="20dp" android:topRightRadius="20dp"/>
</shape>
</item>
<item >
<bitmap android:src="@drawable/header"/>
</item>
</layer-list>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…