首页 > 代码库 > Android: 背景图片平铺要这么干

Android: 背景图片平铺要这么干

<?xml version="1.0" encoding="utf-8"?> 
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="http://www.mamicode.com/@drawable/bg_header" 
    android:tileMode="repeat" > 
</bitmap> 

 

 

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:my="http://schemas.android.com/apk/res/com.seagate.android.dashboard"
    android:id="@+id/titleBar"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/header_background"
    android:orientation="horizontal" >