When using ADT, you can choose to create a new project by choosing tabbed Activity.
In a new project, selecting a different tab page displays different content, primarily through the fragment getItem (int position) method in the Sectionspageradapter class.
Tabbed Activity Quick use:
1. If it is 3 tab, create a new three fragment in the project, display the content you want to display
2. Find the Sectionspageradapter class, in the fragment getItem (int position) method, you can use the switch statement to display different position depending on the fragment.
1 @Override2 PublicFragment GetItem (intposition) {3 //GetItem is called-instantiate the fragment for the given page.4 //Return a placeholderfragment (defined as a static inner class5 //below).6 Switch(position) {7 Case0:8 return Newimg1fragment ();9 Case1:Ten One return Newimg2fragment (); A Case2: - - return Newimg3fragment (); the - } - return NULL; -}
You can create a new activity with tabbed.
Use of fragment-tabbed activity for Android development