我试图在背景上得到一个图像,直到背景已满.
我目前的代码是:
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/cartoonclouds"
android:contentDescription="@string/desc"
android:tileMode="repeat" />
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
然而,这只是使图像覆盖(而不是平铺)从下到上,但不是从左到右.我该怎么办?
编辑:尝试XML版本:
xmlns:android="http://schemas.android.com/apk/res/android"
android:tileMode="repeat"
android:src="@drawable/cartoonclouds" />
main.xml可以在SAME文件夹中找到该XML文件中的cartooncloud,但找不到该XML文件.