title: How to set linear layout background in Android
body: <p>I am very new to Android. How to set background image to entire my relative layout, my image coming from server? Please tell me how to change background.</p>
  
  <p>Here is my code, every image getting through JSON.</p>
  
  <p>ActivityClass.java:</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_movie_rev_fulldis_activity);
      Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
  
      //movie title namename text view
      movie_title=(TextView)findViewById(R.id.revi_fulldes_movietitle);
  
      //movie image in reviews
      movie_image=(ImageView)findViewById(R.id.revi_fulldes_movieImage);
  
      mov_pos=Integer.parseInt((getIntent().getExtras()).getString("mov_pos"));
  
      movie_title.setText(Reviews_update.revData.get(mov_pos).getNewsTitle());
  
      Picasso.with(getApplicationContext()).load((Reviews_update.revData.get(mov_pos)).getNewsImage()).into(movie_image);
  }
  </code></pre>
  
  <p>XML:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/revi_main_layout"
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_marginTop="20dp"
      android:weightSum="1"&gt;
  
      &lt;LinearLayout
          android:layout_marginTop="110dp"
          android:paddingLeft="10dp"
          android:paddingRight="10dp"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal"
          android:background="#FFFFFF"&gt;
  
          &lt;FrameLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"&gt;
  
              &lt;ImageView
                  android:layout_width="120dp"
                  android:layout_height="160dp"
                  android:id="@+id/revi_fulldes_movieImage"
                  android:layout_weight="0"
                  android:padding="10dp"/&gt;
  
          &lt;/FrameLayout&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical"
              android:layout_weight="3"&gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:id="@+id/revi_fulldes_movietitle"
                  android:textSize="18dp"
                  android:padding="10dp"
                  android:textStyle="bold"
                  android:text="Moviewheewd  ewudwd wedewd w"/&gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:id="@+id/revi_fulldes_movierev_sitename"
                  android:layout_marginLeft="10dp"
                  android:layout_marginTop="20dp"
                  android:text="simple  jwehd wj dewjd"/&gt;
  
          &lt;/LinearLayout&gt;
  
      &lt;/LinearLayout&gt;
  </code></pre>