title: Setting background image in java
body: <p>So basically, I have an xml, which i want to reuse. The content is somewhat the same, only the background is different and a few adjustment too.. How can I go about to do this.. I have tried <code>View.setBackGroundDrawable(R.drawable.sample);</code> but it does not work. My app crash. I've placed my image inside one of the drawable folder though.</p>