android: want to use view flipper in tabhost
<p>i have 2 tab in tab host on my top view , now on clicking tab we can go to  that particular activity now i want as i  am in first tab now , first tab have 3 sub activity..now i want to navigate to other sub activity under tab one by flipping of my finger but now problem is that if i have lict view in my first activity and scroll horizontally for flipping to next activity it fail but if i flipp below list view then it works so how to work with flip if i flip above list view ..my code is below..</p>

<p>xml i s:   </p>

<p>
    </p>

<pre><code>        &lt;LinearLayout android:orientation="vertical"
                android:layout_width="fill_parent" android:layout_height="fill_parent"&gt;
                &lt;TabWidget android:id="@android:id/tabs"
                        android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt;
                &lt;FrameLayout android:id="@android:id/tabcontent"
                        android:layout_width="fill_parent" android:layout_height="fill_parent"&gt;


                        &lt;ViewFlipper android:id="@+id/layout_tab_one"
                                android:layout_width="fill_parent" android:layout_height="fill_parent"&gt;

                                &lt;ListView android:id="@+id/listmain" 
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:layout_weight="1"&gt;
                               &lt;/ListView&gt;
         &lt;ListView android:id="@+id/listsub"
         android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:layout_weight="1"&gt;
        &lt;/ListView&gt;


                        &lt;/ViewFlipper&gt;



                        &lt;LinearLayout android:id="@+id/layout_tab_two"
                                android:orientation="vertical" android:layout_width="fill_parent"
                                android:layout_height="fill_parent"&gt;
                                &lt;TextView android:id="@+id/textview2" android:layout_width="fill_parent"
                                        android:layout_height="wrap_content" android:text="this is a tab two" /&gt;
                                &lt;Button android:id="@+id/btn_do_something" android:text="do something"
                                        android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt;

                        &lt;/LinearLayout&gt;

                &lt;/FrameLayout&gt;
        &lt;/LinearLayout&gt;


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

<p>class file is:</p>

<pre><code>    public class Tabs extends TabActivity implements OnClickListener {

Button doSomething;
TabHost tabHost;
ViewFlipper flipper;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.tablayout_1);
    ListView listView = (ListView) findViewById(R.id.listmain);
    String[] values = new String[] { "Android", "iPhone", "WindowsMobile",
    };

    // First paramenter - Context
    // Second parameter - Layout for the row
    // Third parameter - ID of the View to which the data is written
    // Forth - the Array of data
    ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this,
        android.R.layout.simple_list_item_1, android.R.id.text1, values);

    // Assign adapter to ListView
    listView.setAdapter(adapter);



    ListView listView2 = (ListView) findViewById(R.id.listsub);
    String[] values2 = new String[] { "dssaD", "asdad", "WindowasdasMobile",
        "asdasd", "asdsada", "Ubuntu", "Windows7", "Max OS X",
        };

    // First paramenter - Context
    // Second parameter - Layout for the row
    // Third parameter - ID of the View to which the data is written
    // Forth - the Array of data
    ArrayAdapter&lt;String&gt; adapter2 = new ArrayAdapter&lt;String&gt;(this,
        android.R.layout.simple_list_item_1, android.R.id.text1, values2);

    // Assign adapter to ListView
    listView2.setAdapter(adapter2);
    doSomething = (Button) findViewById(R.id.btn_do_something);
    doSomething.setOnClickListener(this);

    flipper = (ViewFlipper) findViewById(R.id.layout_tab_one);
    flipper.setOnClickListener(this);

    tabHost = getTabHost();
       tabHost.addTab(tabHost.newTabSpec("tab1").setIndicator("Tab1").setContent(R.id.layout_tab_one));
      tabHost.addTab(tabHost.newTabSpec("tab2").setIndicator("Tab2").setContent(R.id.layout_tab_two));

    tabHost.setCurrentTab(0);

}

@Override
public void onClick(View v) {

    // show a toast in second tab
    if (v == doSomething) {
        Toast.makeText(getApplicationContext(), "doing something", Toast.LENGTH_SHORT).show();
    }

    // toggle TextView in first tab
    if (v == flipper) {
        flipper.showNext();
    }

}
</code></pre>
