Reputation: 527
It seems like there are two options when you want to show the user a new screen:
startActivity(Intent)
)FragmentTransaction
)What is the difference? Which one should be used?
Example
I want the user to be able to navigate between 3 screens. Each one is in a fragment. I can use ...
Upvotes: 0
Views: 854
Reputation: 393
An activity is a higher-level UI element that often contains fragments. If you are using fragmentTransaction, then you would be swapping fragments within an activity. A whole new activity would be if you were switching to a functionally separate section of your app, for example.
check out these for reference: Activities, Fragments
Upvotes: 2