Reputation: 1580
I heard a lot of recommendation to use fragments in activities, but why is that? I know that fragments can be used when composing screen layouts for small and large device's screens. Is there something more for what can be fragments useful? Can they automatically save and restore state when rotating? Or something else?
Upvotes: 3
Views: 253
Reputation: 277
You should read a little bit more about fragments, here : http://developer.android.com/reference/android/support/v4/app/FragmentActivity.html
You can also look at the available methods so it is clearer what you can do, but I personally don't use fragments in simple apps, event for tablets, do fragments are like "divs" from html, they are just blocks/containers
Upvotes: 2