title: Changing background color with Radio Buttons Android
body: <p>I am attempting to change the background of a tab of my application by selecting a Radio Button from a RadioGroup, however I am not sure how to go about this.</p>
  
  <p>So far I have
  Favs.java:</p>
  
  <pre><code>import android.app.Activity;
  import android.os.Bundle;
  
  public class Favs extends Activity {
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.favs);
    }
  }
  </code></pre>
  
  <p>which points to this .xml file -> favs.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout android:layout_width="fill_parent"
                android:orientation="vertical" 
             xmlns:android="http://schemas.android.com/apk/res/android" 
                android:layout_height="fill_parent"&gt;
     &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="What is your favorite color?" 
              android:padding="3dip"/&gt;
     &lt;RadioGroup android:layout_width="fill_parent"
                 android:layout_height="wrap_content"
                 android:orientation="vertical"&gt;
         &lt;RadioButton android:id="@+id/radio_red"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:text="Red" 
                      android:onClick="onClick" /&gt;
         &lt;RadioButton android:id="@+id/radio_yellow"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:text="Yellow" /&gt;
      &lt;/RadioGroup&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I understand that the android:onClick="onClick" needs to be there however I have no idea what to do after this.</p>