Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Design pattern for fragments in android

I am reading a book and it says like this "Right now, fragments are very new, so there are few well-established patterns to follow"

But I do not know where to read more about the design patterns for fragments at all.

I want to make an application with a lot of different screens and the app should be available for a tablet and for a phone, so the fragments will help me a lot here. But as I said this is big one and I am about to start designing it. So I really need good design. And before I start I want to see some design patterns guidelines for fragments in android.

I there something like best practices or something ? I read a lot about fragments their usage and all those stuff, but I didn't find some well established design pattern for making app for phones and tablets.

I really need advanced chapter about this. Thanks

like image 359
Lukap Avatar asked Sep 20 '11 08:09

Lukap


1 Answers

You've probably read this but just in case, the Android Reference Document on Fragments quite nicely explains how to separate your UI and the Example right at the bottom of the page shows a reasonable way of how a UI using fragments can include more or less fragments given a change in orientation.

like image 134
C0deAttack Avatar answered Oct 04 '22 03:10

C0deAttack