First, set the repeating background
Build a Mybackground.xml file in the Drawable folder to write in the file: <?xml version= "1.0" encoding= "Utf-8"? ><bitmap xmlns:android= " Http://schemas.android.com/apk/res/android "android:src=" @drawable/mybg_img "android:tilemode=" repeat "/>
The Tilemode property is the display mode used to define the background:
Disabled default value, which means that tiles are not used
Clamp Copy Edge Color
Repeat X, Y axis Repeat picture display, that is, we say to say tile
Mirror repeating the drawing of a picture in horizontal and vertical directions using alternating mirrors
Second, use layer-list combination picture
Also build a mylayerlist.xml file under the Drawable folder
Write in File:
<?xml version= "1.0" encoding= "Utf-8"?>
<layer-list xmlns:android= "http://schemas.android.com/apk/res/android" >
<item>
<bitmap android:src= "@drawable/sms_top_bg"
android:gravity= "Center"/>
</item>
<item>
<bitmap android:src= "@drawable/sms_list_selected_arrow"
android:gravity= "Right"/>
</item>
</layer-list>
Only pictures can be added to the bitmap, and the file will not be processed (the original picture is displayed). As shown (the layer-list combination is the blue picture plus the small arrow on the right):
You can join <shape></shape> directly in <item></item>
As shown below:
<?xml version= "1.0" encoding= "Utf-8"?>
<layer-list xmlns:android= " http://schemas.android.com/apk/res/android ">
<item>
<shape>
<gradient
Android:startcolor= "#FFFFFF"
Android:endcolor= "#CAFF70"
Android:type= "Linear"
android:angle= "/>"
<padding android:left= "0DP"
android:top= "0DP"
android:right= "0DP"
android:bottom= "0DP"/>
<corners
Android:toprightradius= "6DP"
Android:topleftradius= "6DP"
Android:bottomleftradius= "6DP"
android:bottomrightradius= "6DP"/>
</shape>
</item>
<item>
<bitmap android:src= "@drawable/sms_list_selected_arrow"
android:gravity= "Right"/>
</item>
</layer-list>