How to replace fragment?


I haven’t finished to read the whole book yet. but I’m a bit confuse about fragment?

before I read this book I read another book. they’re using replace in Activity to call another fragment (MasterFragment replaced with DetailFragment).

but in this book we’re using Intent to call CrimeActivity hosting for CrimeFragment.

what is the difference between these two approaches? both of them using framelayout as a container not fragment in xml.


I asked myself the same question. in other words: dynamically add/replace each fragment to one activity at runtime or start another activity that hosts the other fragment?