title: receving Class Cast Exception caused by ImageButton
body: <p>I have this app which was working find and suddenly is crashing caused by ClassCastException: android.widget.ImageButton. The only change I made between working and not was the background to the relative layout from a solid color to a drawable (blue with a pattern).</p>
  
  <p>xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:baselineAligned="false"
  android:orientation="vertical" &gt;
  
  &lt;include
      android:id="@+id/linearLayout1_ref"
      android:layout_width="match_parent"
      android:layout_height="75dip"
      layout="@layout/title_area" /&gt;
  
  
  &lt;RelativeLayout
      android:id="@+id/relativeLayout1"
      android:layout_width="match_parent"
      android:layout_height="fill_parent"
      android:background="@drawable/fur" &gt;
  
      &lt;View
          android:id="@+id/view5"
          style="@style/BlueBandHor"
          android:layout_width="wrap_content"
          android:layout_alignParentTop="true"
          android:layout_centerHorizontal="true" /&gt;
  
      &lt;View
          android:id="@+id/view3"
          style="@style/BlueBandVer"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_below="@id/view5"
          android:layout_centerVertical="true" /&gt;
  
      &lt;View
          android:id="@+id/view4"
          style="@style/BlueBandVer"
          android:layout_height="wrap_content"
          android:layout_alignParentRight="true"
          android:layout_below="@id/view5"
          android:layout_centerVertical="true" /&gt;
  
      &lt;View
          android:id="@+id/view1"
          style="@style/BlueBandHor"
          android:layout_width="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_centerHorizontal="true"
          android:layout_marginBottom="48dp" /&gt;
  
      &lt;ImageButton
          android:id="@+id/btn1"
          style="@style/Image"
          android:layout_below="@id/view5"
          android:layout_centerHorizontal="true"
          android:contentDescription="@string/portrait"
          android:onClick="onButtonClick"
          android:paddingLeft="5dip"
          android:paddingRight="5dip"
          android:src="@drawable/orionhead" 
          android:background="@drawable/button_active" 
          android:clickable="true"/&gt;
  
      &lt;ImageButton
          android:id="@+id/btn3"
          style="@style/Image"
          android:layout_toRightOf="@+id/view3"
          android:contentDescription="@string/portrait"
          android:onClick="onButtonClick"
          android:paddingLeft="5dip"
          android:paddingRight="5dip"
          android:src="@drawable/stonewallhead" 
          android:background="@drawable/button_active" 
          android:clickable="true" 
          android:layout_centerVertical="true"/&gt;
  
      &lt;Button
          android:id="@+id/how_tobtn"
          style="@style/HowTo"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_above="@+id/view1"
          android:layout_centerHorizontal="true"
          android:layout_marginBottom="20dip"
          android:background="@drawable/howto_button_active"
          android:padding="5dip"
          android:text="@string/How_to"
          android:textColor="@color/yellow"
          android:textSize="25dip" 
          android:onClick="onButtonClick"/&gt;
  
      &lt;ImageButton
          android:id="@+id/btn2"
          style="@style/Image"
          android:layout_toLeftOf="@+id/view4"
          android:contentDescription="@string/portrait"
          android:onClick="onButtonClick"
          android:paddingLeft="5dip"
          android:paddingRight="5dip"
          android:src="@drawable/truffelhead" 
          android:background="@drawable/button_active" 
          android:clickable="true" 
          android:layout_centerVertical="true"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>java file:</p>
  
  <pre><code> public class ImageActivity extends Activity {
  
   @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
  public void onClick(View view) 
  {Intent intent;
      switch (view.getId()) {
      case R.id.how_tobtn:
          intent = new Intent(this, Howbtn.class);
          break;
      case R.id.btn1:
          intent = new Intent(this, Btn1.class);
          break;
      case R.id.btn2:
          intent = new Intent(this, Btn2.class);
          break;
      default:
      intent = new Intent(this, Btn3.class);
      break;
              }   
  </code></pre>
  
  <p>Any ideas of what the problem is?  Thank you for any help.</p>