Hi
I'm trying to adapt the ViewPager code, but have only just started
creating apps a couple of weeks ago and still find it all a little
confusing.
I would like to use a series of XML layouts instead of the Java
LinearLayout. How would I go about doing this?
i.e. replace the stuff inside the curly brackets below...

@Override
public Object instantiateItem(View collection, int position) {
                LinearLayout ll = new LinearLayout(cxt);
                TextView tv = new TextView(cxt);
                int PAGENUM = position+1;
                tv.setText("Test Page - Page " + PAGENUM+" of " 
+NUM_AWESOME_VIEWS);
                tv.setTextColor(Color.BLACK);
                tv.setTextSize(15);
                ll.addView(tv);
                ll.setGravity(Gravity.CENTER_HORIZONTAL);
                ((ViewPager) collection).addView(ll,0);
                return ll;
}

Any help would be much appreciated!
Cheers

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to