Why ListView is hiiden in ViewPageras
<p>I have a view pager in my activity and it had 2 items , in one item was listview and in other was some textview , every thing works fine , but when I change that to three view , and when I slide to page 3 , and come back to page 1 that has listview , list view not appearing , something it is unvisible ! but other view like button is appearing in page 1 ?</p>

<p>why I have this problem in 3 page but not 2 ? and how can Is solve that ?</p>

<p>thanks</p>

<pre><code>public Object instantiateItem(View collection, int position) {

        LayoutInflater inflater = (LayoutInflater) collection.getContext()
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);

        int resId = 0;
        switch (position) {
        case 0:
            resId = R.layout.main_listbox;
            Log.d("GGGG", "ListBox");
            break;
        case 1:
            resId = R.layout.mediaplayer;
                        Log.d("GGGG", "MediaPlayer");
            break;
        case 2:
            resId = R.layout.tools;
            Log.d("GGGG", "Tools");
            break;
        }
        View view = inflater.inflate(resId, null);
        view.setTag(resId);
        ((ViewPager) collection).addView(view, 0);
        return view;
    }
</code></pre>

<p>Also each time I change page , I have this log again .</p>
