Turn http://blog.csdn.net/look85/article/details/8563906
Before writing this, really need to spit groove ... About Android Development, the use of pageadapter can be found on the internet really little to no, this is the first encounter, in the attempt to all kinds of Baidu, all kinds of Google without fruit. I'm starting to wonder if it's what I think. This problem is too superficial, in the eyes of others is not a problem pinch, others are a glance can know how to use the drip? .... Depressed to death ... Helpless can only open the help document of the Android SDK, by the way open Youdao, find PageAdapter class, God ... All English documents for a person who is not good at English, this is how tragic it is .... Looked at an afternoon of the help document, so have the following about PageAdapter understanding, English is not good, wrong really don't blame me, someone understand also hope to share ... Thx!!!
Pageradapter usage
PageAdapter is an abstract class that inherits directly from object and is imported into the package Android.support.v4.view.PagerAdapter to be used.
The original description of Pageaapter is this: Base class providing the adapter to populate pages inside of a viewpager. You'll most likely want to use a more specific implementation of this, such as Fragmentpageradapter or fragmentstatepage Radapter.
In fact, Pageradapter is an adapter provided by Viewpager, which allows us to control each view. What is that Viewpager? It is the realization of the left and right two screens smoothly to switch a class, specific Baidu Google ... There are many ways to use Viewpager.
To use Pageradapter, first inherit the Pageradapter class, and then at least overwrite the following method Instantiateitem (viewgroup, int)/** This method, return an object, This object indicates which object the Pageradapter adapter chooses to place in the current Viewpager **/destroyitem (viewgroup, int, Object)/** This method, which removes the current ViewGroup from the view** /GetCount ()/** This method, is to get the current form interface number **/Isviewfromobject (View, Object)/** This method, in the text of the help document is could be implemented as return View = = Object,* is also used to determine whether the interface is generated by an object **/
How to use Android pageradapter