ClassCastException TextSwitcher to Adview
<p>My xml layout is:</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#C5C6E1"
    android:orientation="vertical"
    tools:context=".MainActivity" &gt;

    &lt;LinearLayout
        android:id="@+id/topll"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" &gt;

        &lt;com.google.ads.AdView
            android:id="@+id/adView"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            ads:adSize="SMART_BANNER"
            ads:adUnitId=""
            ads:loadAdOnCreate="true" &gt;
        &lt;/com.google.ads.AdView&gt;

        &lt;TextView
            android:id="@+id/textView2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Drag to set font size" /&gt;

        &lt;SeekBar
            android:id="@+id/seekBar1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:max="100"
            android:progress="25" /&gt;
    &lt;/LinearLayout&gt;

    &lt;RelativeLayout
        android:id="@+id/ll"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" &gt;

        &lt;TextView
            android:id="@+id/titleText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="@dimen/questionTEXT"
            android:textStyle="bold" /&gt;

        &lt;TextSwitcher
            android:id="@+id/textView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_above="@+id/titlefav"
            android:layout_below="@+id/titleText"
            android:lines="15" &gt;
        &lt;/TextSwitcher&gt;

        &lt;RelativeLayout
            android:id="@+id/titlefav"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/adView1"
            android:layout_alignParentLeft="true" &gt;

            &lt;TextView
                android:id="@+id/tipText"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Swipe for more quotes"
                android:textSize="14sp"
                android:textStyle="bold" /&gt;

            &lt;ImageView
                android:id="@+id/fav"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:src="@drawable/f_disable" /&gt;
        &lt;/RelativeLayout&gt;

        &lt;com.google.ads.AdView
            android:id="@+id/adView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            ads:adSize="SMART_BANNER"
            ads:adUnitId=""
            ads:loadAdOnCreate="true" &gt;
        &lt;/com.google.ads.AdView&gt;
    &lt;/RelativeLayout&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>When I try to get the textswitcher as:
tv = (TextSwitcher) findViewById(R.id.textView1);</p>

<p>I get the following exception:</p>

<p>android.widget.TextSwitcher cannot be cast to com.google.ads.AdView. Any ideas why this is happening?</p>
