XML Code - (Radio Buttons and Spinners)

Place the following code in: res/layout/main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="#000000"
  android:orientation="vertical"
  android:padding="15sp" >

  <TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Membership:"
    android:textColor="#FFFFFF"        
    android:textSize="18sp"
    android:textStyle="bold" />

  <RadioGroup
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" >
    
    <RadioButton
      android:id="@+id/membership1"
      android:checked="false"
      android:text="Basic"
      android:textColor="#FFFFFF" />

    <RadioButton
      android:id="@+id/membership2"
      android:checked="false"
      android:text="Gold"
      android:textColor="#FFFFFF" />

    <RadioButton
      android:id="@+id/membership3"
      android:checked="true"
      android:text="Gold Plus"
      android:textColor="#FFFFFF" />
  </RadioGroup>

  <TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="20sp"
    android:text="Age:"
    android:textColor="#FFFFFF"
    android:textSize="18sp"
    android:textStyle="bold" />

  <Spinner
    android:id="@+id/ageSpinner"
    android:layout_width="200sp"
    android:layout_height="wrap_content"
    android:layout_marginLeft="20sp"
    android:layout_marginTop="10sp"
    android:background="#FFFFFF"
    android:entries="@array/ages" >    
  </Spinner>

  <View 
    android:layout_width="fill_parent"
    android:layout_marginTop="20sp"
    android:layout_height="2sp"
    android:background="#FFFFFF" />
     
  <Button
    android:id="@+id/calculate"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@android:drawable/editbox_background"
    android:text="Calculate Total"
    android:layout_marginTop="20sp"
    android:textColor="#000000"
    android:textSize="18sp" />

  <LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:padding="10sp" >

    <TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginLeft="10sp"
      android:gravity="left"
      android:padding="3sp"
      android:text="Total:"
      android:textColor="#FFFFFF"
      android:textSize="20sp" />

    <TextView
      android:id="@+id/total"
      android:layout_width="100dp"
      android:layout_height="wrap_content"
      android:layout_marginLeft="10sp"
      android:background="@android:drawable/editbox_background"
      android:gravity="left"
      android:paddingLeft="10sp"
      android:text=""
      android:textColor="#000000"
      android:textSize="20sp" />

    </LinearLayout>

</LinearLayout>



Place the following code in: res/values/ageArray.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string-array
        name="ages">
        <item>Under 10</item>
        <item>11 - 64</item>
        <item>Over 65</item>
    </string-array>
</resources>