0

Is it a good idea to mix Fragments and Activities? In my app, few windows need to be Fragments because they should have ViewPager. Other screens are normal.

So my question is, when you started using Fragments, do you use Fragments everywhere? Whether it is needed or not? My app should support 5 inch to 4 inch screen only anyway.

halfer
  • 19,824
  • 17
  • 99
  • 186
PeakGen
  • 21,894
  • 86
  • 261
  • 463
  • i use both in my application and work fine – Bhanu Sharma Nov 27 '13 at 06:30
  • i also use fragment activity – Bhanu Sharma Nov 27 '13 at 06:30
  • Check out some opinions on related thread: [How many Activities vs Fragments?](http://stackoverflow.com/questions/12363790/how-many-activities-vs-fragments) – Richard Le Mesurier Nov 27 '13 at 06:37
  • @RichardLeMesurier: So basically what you mean is keep one activity? (The main) – PeakGen Nov 27 '13 at 06:46
  • You use activities anyway (at least one). In some aspects, activities are easier to manage, but they have some limitations. It's OK to use both where it does the job. – Display Name Nov 27 '13 at 06:55
  • No I'm just saying the opinions on that thread may be interesting for people reading this thread. Rather form your own opinion. e.g. Google & commonsware both seem to suggest building your phone app with many Activities, but building your tablet app with one Activity. My belief after all this time is that it is just a matter of style, no right or wrong way. – Richard Le Mesurier Nov 27 '13 at 08:01

0 Answers0