一.创建XML文件:res/drawable/filenam
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap android:src="@drawable/android_red"
android:gravity="center"/>
</item>
<item android:top="10dp"android:left="10dp">
<bitmap android:src="@drawable/android_green"
android:gravity="center"/>
</item>
<item android:top="20dp"android:left="20dp">
<bitmap android:src="@drawable/android_blue"
android:gravity="center"/>
</item>
</layer-list>
注:android:src图片来源
android:top顶部像素抵消
android:bottom底部相熟抵消
android:left左边像素偏移
android:right右边像素偏移
二.调用XML文件
<ImageView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/layers"/>