I have set the background of my activity by doing:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/image">
What I’m doing: In my main activity it will chose whether I want image1 or image2 and then make either image1 or image 2 the background for the activity.
Thanks
Try this
In the XML,
This will work. Based on the condition, it will set image1 or image2