Question: what is the difference between activity and fragment in android?
Answer: Activity is the part where the user will interacts with your application. ... Fragment represents a behavior or a portion of user interface in an Activity. You can combine multiple fragments in a single activity to build a multi-pane UI and reuse a fragment in multiple activities.