Adding content from ViewPager adapter to an xml layout
<pre><code> public Object instantiateItem(View collection, int position) {
            View v = collection;


            if (v == null) {
                LayoutInflater vi = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                v = vi.inflate(R.layout.gallery_layout, null);

            }


            final String url = listOfImages.get(position);
                TextView tv = (TextView)v.findViewById(R.id.textView1);
                tv.setText(url);
                tv.setTextColor(Color.WHITE);
                tv.setTextSize(30);



                ((ViewPager) v).addView(tv,0);

                return v;
        }
</code></pre>

<p>Above is perhaps a really bad implementation of ViewPager. I'm trying to just use my xml layout for every page. I'm basing my code off of how I used my Gallery widget, but I dont think it will be the same.</p>
