Summary 1: When we share viewpager and fragment, the life cycle changes when you switch pages: Load the current page, the previous page, and the next page, and we'll take a look at an actual test
Opening an app loads the first and second pages:
When we switch to the second item, Page1 and Page2 do not change, page3 load:
When we switch to the third page, Page1 will stop, Page2, 3 does not change, page4 load:
The results obtained are consistent with the above conclusions.
Summary 2: Add a jar package to the project:
If we are going to import a larger package, or a middleware company customized Android system layer for our application to do the development, do not put this package in the Libs folder, because this operation will probably put your eclipse card dead, directly on the outermost build path is possible, This will not make any impact on your running, and the apk you generate will not become much more of a summary of the problems you are experiencing at work.
Life cycle changes of pager pages during Viewpager switching