[Fragment] Android learning, detailed fragmentation - general catalog

This article is the navigation page of the fragmentation module - continuously updated

1. What is Fragmentation?

Fragment is a UI fragment     that can be embedded in an Activity .

    Fragment is similar to Activity, it also includes its own layout and its own declaration cycle, which can be understood as: a fragment is a small activity.

2. How Fragments are used

    2.1 - Static loading (basic usage)

    2.2 - Dynamic addition (note the wording, add, not load)

    2.3- Simulate the return stack in Fragment

    2.4- Communication between Fragment and Activity

3. Fragment life cycle

    3.1- Fragment state and callback

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325541223&siteId=291194637