My research ::Significant difference is the concept of backstack and how they exist
Activity::
When an
activityis placed to thebackstackofactivitiesthe user can navigate back to the previous activity by just pressing thebackbutton.Activitycan exist independently.
Fragment::
When an
fragmentis placed to the activity we have to request the instance to be saved by callingaddToBackstack()during thefragmenttransaction.Fragmenthas to live inside theactivity
0 comments:
Post a Comment