I am attempting to add a tiled image as a background of the program.
The code that I am currently using in main.xml, which is crashing:
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/cartoonclouds"
android:contentDescription="@string/desc" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
</LinearLayout>
</ImageView>
However, when the ImageView
is removed and the xmlns
is moved to the LinearLayout
, it functions fine (without, of course, the image).
I can't see any related errors in LogCat.
More information:
Using Eclipse and Android 2.2, API 8. The program runs but crashes instantly.