Home > Web Front-end > HTML Tutorial > Life cycle changes of pager page when Viewpager switches_html/css_WEB-ITnose

Life cycle changes of pager page when Viewpager switches_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:47:57
Original
1659 people have browsed it

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.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template