Basic Fragment Test Application with Source Code

Utsav Verma / / 0


Android Fragments Example :


A fragment represents a portion of a user interface or an operation that runs within an activity.
A single activity can contain multiple fragments and many fragments can be reused in many, different activities. It is not wrong if we say that a fragment is a type of sub-activity that can be utilised again in multiple activities.
Although each fragment has each own lifecycle, it is connected with the activity it belongs to, so its lifecycle is directly influenced by the activity’s lifecycle.
The main advantage of using fragments is due to the convenience of reusing the components in different layouts. In this tutorial, we are going to create our own fragments, where each one will be used when the user presses the appropriate button.














Related Posts

Utsav Verma


Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut odio. Nam sed est. Nam a risus et est iaculis adipiscing. Vestibulum ante ipsum faucibus luctus et ultrices.
Follow me @Bloggertheme9

0 comments:

About Me

My photo
I work as an Analyst in HCL Technologies. Android App Development is my hobby. As a passionate technology lover, you need to keep yourself updated with trending technologies. The best way to learn and stay up to date is simply to do something creative. I’ve a number of small personal app projects and each one have been rewarding and useful in one way or the other.