i want to set background of linearlayout with repeating image.
i have 2 files.
main_bg.xml
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/bg"
android:tileMode="repeat" />
and main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/main_bg"
>
and i’ve bg.png image on folder drawable.
But Eclipse says there’s an error
error: Error: No resource found that matches the given name (at ‘background’ with value ‘@drawable/main_bg’).
How to fix it?
Place main_bg.xml in drawable folder. That is in res/drawable.