I have an activity with a background:
LinearLayout vi = (LinearLayout ) findViewById() vi.setBackgroundResource(R.drawable.);
you need to provide the id to your LinearLayout in XML as well....