1

How to use single Fragment for all the pages in the ViewPager?

view story
linux-howto

http://stackoverflow.com – In my application I have to show the Student details in ViewPager. I used one fragment (say StudentPageFragment) and I write widget initializing code in onCreateView() like: public static Fragment newInstance(Context context) { StudentPageFragment f = new StudentPageFragment(); return f; } public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup root = (ViewGroup) inflater.inflate(R.layout.stud_list_page, null); // initialize all widgets here displa (HowTos)