Do fragments work as an Activity?

Asked

Viewed 77 times

0

I saw that to continue using a Navigation Drawer, I have to use Fragments, or I can use Activity ? or there is no difference between the two ?

1 answer

1


The idea of Fragment is to represent behavior or a user interface within a Activity. In a Activity you can have several Fragment. And you can even use Fragment in other Activity. With this, you can write more componentized and reusable Android applications.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.