1. From the Internet read a lot of fragment on the brief introduction, found that all are similar to the understanding, and all of them are roughly the same as the activity, did not say clearly the activity and fragment the specific relevance and difference, a lot of rubbish.
Here I also record my rubbish understanding:
On the life cycle of fragment, it really should be, as most people say, similar to activity and usage, but it's not enough to teach us how to use fragment.
Fragment is supposed to be part of the activity, more like a dynamic panel (perhaps actually a panel, which is just a loading force), which can be dynamically laid out, so fragment is only able to manage it independently of the activity on the interface. , but the response to the event, and other more complex operations are maintained by activity maintenance rather than fragment, so the fragment class is specifically responsible for its layout as part of the activity, and the event is still responsible for responding to the activity.
For example, the response to a button event in fragment requires that the corresponding response method be overridden in the activity (not the Fragment Class), and where the Setlistener method is used (this shows the fragment dependency, The fragment is included in the activity, and ultimately the button ID is obtained by activity)
Not to be continued ...