Friday 21 October 2016

Fragments

 Fragment :-
Android piece lifecycle is influenced by movement lifecycle on the grounds that sections are incorporated into action. Every part has its own life cycle strategies that is influenced by action life cycle since pieces are installed in action. The FragmentManager class is mindful to make cooperation between piece objects.
How to Creating a Fragment :-
To make a part, you should make a subclass of Fragment (or a current subclass of it). The Fragment class has code that looks a great deal like an Activity. It contains callback strategies like a movement, for example, onCreate(), onStart(), onPause(), and onStop(). Indeed, in case you're changing over a current Android application to utilize pieces, you may just move code from your action's callback strategies into the separate callback techniques for your part.
 How Fragment are in single screen or multiple screen as shown figure below :

Android Fragment fig :1



















No comments:

Post a Comment