Hi, I am trying to replace the code below with a fragment or layout
from xml. Does anyone know how to call the xml from inside these
brackets? FindByID doesn't work and it also doesn't let me use
Inflate, as it says that it is inside a pagerAdapter. ---private class
AwesomePagerAdapter extends PagerAdapter---

Any help would be much appreciated - I am new to Android development
and its been days trying now!
Kind Regards
Sally



@Override
                public Object instantiateItem(View collection, int position) {

                        /*
                        //for now we have just created a text layout but we 
need to replace
with fragment or
                        //inflate a layout
                        LinearLayout ll = new LinearLayout(cxt);

                        TextView tv = new TextView(cxt);
                        int PAGENUM = position+1;
                        tv.setText("Test- 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;
                        */



                }

-- 
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