title: class cast exception in TableRow
body: <p>I found a problem in handling TableRow show please give me appropriate solution</p>
  
  <p>in My Java File </p>
  
  <pre><code>  tr1 = (TableRow)findViewById(R.id.facebook_raw);
    tr2 = (TableRow)findViewById(R.id.twitter_raw);
  </code></pre>
  
  <p>and in my Xml file</p>
  
  <pre><code>&lt;TableLayout android:layout_width="wrap_content"
              android:id="@+id/follow_us" android:layout_centerHorizontal="true"
              android:background="@drawable/listback" android:layout_height="wrap_content"
              android:stretchColumns="1" android:layout_marginRight="10dip"
              android:layout_marginLeft="10dip"&gt;
              &lt;TableRow android:id="@+id/facebook_raw"
                  android:layout_marginBottom="8dip"&gt;
                  &lt;ImageView android:layout_width="wrap_content"
                      android:src="@drawable/facebook" android:id="@+id/que1"
                      android:layout_height="wrap_content"&gt;&lt;/ImageView&gt;
                  &lt;TextView android:text="Follow us on Facebook"
                      android:layout_width="wrap_content" android:textStyle="bold"
                      android:textColor="#000000" android:layout_marginLeft="15dip"
                      android:textSize="16sp" android:layout_height="wrap_content"
                      android:layout_gravity="center_vertical" /&gt;
                  &lt;ImageView android:layout_width="wrap_content"
                      android:layout_marginRight="10dip" android:src="@drawable/arrow"
                      android:layout_gravity="center_vertical" android:layout_height="wrap_content"&gt;&lt;/ImageView&gt;
              &lt;/TableRow&gt;
              &lt;View android:layout_height="1dip" android:background="#A9ABAD"
                  android:layout_width="wrap_content" /&gt;
              &lt;TableRow android:id="@+id/twitter_raw"
                  android:layout_marginTop="8dip"&gt;
                  &lt;ImageView android:layout_width="wrap_content"
                      android:src="@drawable/twitter" android:layout_height="wrap_content"&gt;&lt;/ImageView&gt;
                  &lt;TextView android:text="Follow us on Twitter"
                      android:layout_width="wrap_content" android:textStyle="bold"
                      android:textColor="#000000" android:layout_marginLeft="15dip"
                      android:textSize="16sp" android:layout_height="wrap_content"
                      android:layout_gravity="center_vertical" /&gt;
                  &lt;ImageView android:layout_width="wrap_content"
                      android:layout_marginRight="10dip" android:src="@drawable/arrow"
                      android:layout_gravity="center_vertical" android:layout_height="wrap_content"&gt;&lt;/ImageView&gt;
              &lt;/TableRow&gt;
          &lt;/TableLayout&gt;
  </code></pre>
  
  <p>error...........</p>
  
  <pre><code>09-02 17:49:57.235: ERROR/AndroidRuntime(832): FATAL EXCEPTION: main
  09-02 17:49:57.235: ERROR/AndroidRuntime(832): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.stress/com.stress.TabGroup5Activity}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.stress/com.stress.More}: java.lang.ClassCastException: android.widget.ListView
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1622)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.app.ActivityThread.startActivityNow(ActivityThread.java:1462)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:654)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.widget.TabHost.setCurrentTab(TabHost.java:326)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:132)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:456)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.view.View.performClick(View.java:2485)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.view.View$PerformClick.run(View.java:9080)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.os.Handler.handleCallback(Handler.java:587)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.os.Handler.dispatchMessage(Handler.java:92)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.os.Looper.loop(Looper.java:123)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.app.ActivityThread.main(ActivityThread.java:3647)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at java.lang.reflect.Method.invokeNative(Native Method)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at java.lang.reflect.Method.invoke(Method.java:507)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at dalvik.system.NativeStart.main(Native Method)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.stress/com.stress.More}: java.lang.ClassCastException: android.widget.ListView
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1622)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.app.ActivityThread.startActivityNow(ActivityThread.java:1462)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at com.stress.TabGroupActivity.startChildActivity(TabGroupActivity.java:67)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at com.stress.TabGroup5Activity.onCreate(TabGroup5Activity.java:10)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1586)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     ... 18 more
  09-02 17:49:57.235: ERROR/AndroidRuntime(832): Caused by: java.lang.ClassCastException: android.widget.ListView
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at com.stress.More.onCreate(More.java:44)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1586)
  09-02 17:49:57.235: ERROR/AndroidRuntime(832):     ... 25 more
  </code></pre>