0
我想创建一个具有重复背景图像的布局。我搜索并来自this tutorial 但似乎不适合我! 以下展会activity_main.xml中背景重复图像不起作用
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/backrepeat"
android:gravity="center_horizontal"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/app_name" />
</LinearLayout>
,这是backrepeat.xml
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:dither="true"
android:src="@drawable/bg"
android:tileMode="repeat" />
也把backrepeat.xml在绘制文件夹中。 我应该添加还是删除一些代码?
感谢
不知道我得到正确你的问题,所以你希望您的背景变得生动。如果是这样,请尝试[AnimationDrawable](http://developer.android.com/reference/android/graphics/drawable/AnimationDrawable.html) – Wenhui
您的'drawable/bg'图像有多大? – slybloty
bg图像的大小是3px中的3px.does它的重要性? – IndieBoy