Summary 1: When we use ViewPager and Fragment together, the life cycle will change accordingly when switching pages. The change pattern is: loading the current page, the previous page and the next page. Let's take a look at a practical Test rendering
Opening the app will load the first page and the second page:
When we switch to the second item, Page1 and page2 do not change, page3 loads:
When we switch to the third page, page1 will stop, page2 and page3 do not change, page4 loads:
The results obtained are consistent with the above conclusion.
Summary 2: Regarding adding jar packages to the project:
If the package we want to import is relatively large, or it is an android system layer customized by a middleware company, When developing our application, do not put this kind of package in the libs folder, because it may freeze your eclipse as soon as it is run. Just put it directly in the outermost build path, which will not run on you. Regardless of any impact, the apk you generate will not become much larger. This is a summary of the problems encountered at work.