A good lunchtime read, thanks. A couple of misleading topics and word of advice from our own experience [0] of starting Android development after years of iOS development:
- Google seems to moving away from Activities in favor of Fragments (can someone confirm this?) so we'd recommend a Fragment based design pattern;
- App navigation paradigms seem to be evolving quickly, with Google recently introducing Navigation Drawer as a standard [1], among others;
- Choosing the navigation paradigm first seems to important as these seem to be Fragment based, using Bundle objects to share data between Fragments;
- Use Android Studio [2] because it seems a) Google is going to standardize on this, and b) the navigation paradigms are offered as app template options and can be a good starting point presumably with 'blessed' Fragment design patterns.
Your Fragment subclasses is where your code that interacts with the user should be (the code that used to be in your Activity subclasses). Activity should contain Fragment objects by means of loading a layout.
The cool thing about Fragment is that you can organize your Fragment subclasses using different layout files, and you can organize the layout files using resource qualifiers. That means that Android is picking your layouts, and the number and layout of Fragment objects on a particular screen geometry, for you, instead of you having to write code that groks screen size, density, and text size.
I dislike navigation drawers almost as much as I disliked the now deprecated "dashboards." It is a place where you can do nothing but go some other place. If you have that big an app, I suppose it's OK. But making navigation a natural part of, say, picking an item from a list, or picking a menu item is preferable. Nav drawers look better than dashboards, but if you consider them from the user interaction PoV, they are the same.
Yes to using Bundle objects to move data. That's how sending data to a Fragment is independent of whether it is in the same Activity or not.
I thought the Navigation Drawer was no longer considered a best practice. I wanted to move to it on my iPhone app but I read a couple of blogs that claimed it wasn't good.
- Google seems to moving away from Activities in favor of Fragments (can someone confirm this?) so we'd recommend a Fragment based design pattern;
- App navigation paradigms seem to be evolving quickly, with Google recently introducing Navigation Drawer as a standard [1], among others;
- Choosing the navigation paradigm first seems to important as these seem to be Fragment based, using Bundle objects to share data between Fragments;
- Use Android Studio [2] because it seems a) Google is going to standardize on this, and b) the navigation paradigms are offered as app template options and can be a good starting point presumably with 'blessed' Fragment design patterns.
Good luck!
[0] http://blog.fieldforceapp.com [1] http://developer.android.com/design/patterns/navigation-draw... [2] http://android-developers.blogspot.com/2013/05/android-studi...