Advocating Against Android Fragments
Rem: A Fragment represents a behavior or a portion of user interface in an Activity. You can combine multiple fragments in a single activity to build a multi-pane UI and reuse a fragment in multiple activities. You can think of a fragment as a modular section of an activity, which has its own lifecycle, receives its own input events, and which you can add or remove while the activity is running (sort of like a "sub activity" that you can reuse in different activities). [Ref: https://developer.android.com/guide/components/fragments.html]
See:
https://medium.com/square-corner-blog/advocating-against-android-fragments-81fd0b462c97#.bgs2wy5h9
Rem: A Fragment represents a behavior or a portion of user interface in an Activity. You can combine multiple fragments in a single activity to build a multi-pane UI and reuse a fragment in multiple activities. You can think of a fragment as a modular section of an activity, which has its own lifecycle, receives its own input events, and which you can add or remove while the activity is running (sort of like a "sub activity" that you can reuse in different activities). [Ref: https://developer.android.com/guide/components/fragments.html]
See:
https://medium.com/square-corner-blog/advocating-against-android-fragments-81fd0b462c97#.bgs2wy5h9
Steve Pomeroy made a diagram of the complete lifecycle for Android fragments. |
The lifecycle of a fragment (while its activity is running). [Ref: https://developer.android.com/guide/components/fragments.html] |
No comments:
Post a Comment