Adding and Replacing Fragments

A Fragment adds a portion of the UI to an Activity. There can be multiple fragments attached to the same Activity. Reasons to use fragment over custom views are for the back-stack management & the life cycle features.

There are two ways to attach a fragment to an Activity. You can either add or replace a fragment. Continue reading “Adding and Replacing Fragments”