title: How to set a background image for each fragment in an activity?
body: <p>I have a tabed view with 3 fragments.
  I want to apply a background image for each fragment seperately.
  so far, I can apply a bd clor by-</p>
  
  <pre><code> android:background="#ff8400"
  </code></pre>
  
  <p>but if i try using </p>
  
  <pre><code> android:background="@drawable/bgimage"
  </code></pre>
  
  <p>it does not work.</p>
  
  <p>I tried to set it through code using </p>
  
  <pre><code>rootView.setBackground(R.raw.bgone);
  </code></pre>
  
  <p>as well as </p>
  
  <pre><code>LinearLayout l = (LinearLayout) rootView.findViewById(R.id.gameslay);
  </code></pre>
  
  <p>as suggested in other answers but with fail.</p>
  
  <p>Searching for a solution for two days but cant find any.Many answers for this problem are remaining unanswered here.Also, one or two answered questions are not clear for a beginner like me, please help!</p>