1.

What is a fragment?

Answer»
  1. A Fragment represents a behavior or a portion of USER interface.
  2. A fragment must always be hosted in an activity and the fragment's lifecycle is directly affected by the host activity's life-cycle.
  3. When a fragment is ADDED as a PART of activity layout, it lives in a ViewGroup inside the activity's view hierarchy and the fragment defines its own view layout.


Discussion

No Comment Found

Related InterviewSolutions