How to add the ListActivities to the ViewPager in android?
<p>I am preparing the Swipe by using ViewPager. In my application display the 4 ListActivities by using ViewPager.I Know how to add the views in ViewPager but I dont Know how to add the ListActivity in my app.
Please help me..................</p>

<pre><code>    private class MyPagerAdapter extends PagerAdapter {

    private ArrayList&lt;LinearLayout&gt; views;

    public MyPagerAdapter(Context context) {

        views = new ArrayList&lt;LinearLayout&gt;();
        views.add(new ListView1Page(context));
        views.add(new TextViewPage(context));
        views.add(new ListView2Page(context));
        views.add(new ButtonPage(context));

    }

    @Override
    public void destroyItem(View view, int arg1, Object object) {
        ((ViewPager) view).removeView((LinearLayout) object);
    }

    @Override
    public void finishUpdate(View arg0) {

    }

    @Override
    public int getCount() {
        return views.size();
    }

    @Override
    public Object instantiateItem(View view, int position) {
        LinearLayout myView = views.get(position);
        ((ViewPager) view).addView(myView);//addView(myView);
        return myView;

    }

    @Override
    public boolean isViewFromObject(View view, Object object) {
        return view == object;
    }

    @Override
    public void restoreState(Parcelable arg0, ClassLoader arg1) {

    }

    @Override
    public Parcelable saveState() {
        return null;
    }

    @Override
    public void startUpdate(View arg0) {

    }

}
</code></pre>
