在开发中,如果图片长度不够想实现平铺效果,可以先在drawable中新建一个图片资源xml
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/hua_bg"//被平铺的图片
android:tileMode="repeat" >
</bitmap>
然后在需要平铺的位置新建一个LinearLayout,将背景设置为新建的图片<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/huaer_bg" />