title: Android - how to make a complex tabbed app with views
body: <p>First question on Stack Overflow, apologies if it is not well formed.</p>
  
  <p>I am developing a relatively complex tabbed app, and already had the basics set up before coming across information that ActivityGroup and TabActivity are deprecated, and the preferred model is to use views. </p>
  
  <p>I have had no trouble using views, this is a question about architecture rather than syntax (which is why I haven't posted any code). Specifically, <em>how should I go about restructuring the app to use views instead of Intent launched Activities</em>.</p>
  
  <p>The app has five tabs; two hold a single layout, no problem there.  The other three tabs are running an ActivityGroup with 2-5 different Activities (i.e. a tab running an activity for settings, where clicking each view starts a new Activity dealing that particular setting, pressing the back button returns you to the broader settings activity/view).  If I were to keep each Tab as a TabActivity, it would still be fairly easy to change those internal transitions to views as opposed to separate Activities.</p>
  
  <p>The main question is using ONLY views, no TabActivity/Activity group at all. The vast majority of the research I've done has been discussion about whether to use Activities or Views, or about specific syntax. I haven't been able to gather a clear idea of how to actually MAKE the transition to views across the whole application.</p>
  
  <ol>
  <li><p>If I were to do so, wouldn't the entire app now be running in a single Activity - the one hosting the tabbed layout?  </p></li>
  <li><p>If (1) is true, how to manage this?  Despite ActivityGroup being deprecated, all of the Android documentation still seems to state that it is preferred to use separate Activities for separate aspects of functionality--which makes sense.  Did the Android development team simply decide that the costs to the stack and the device made the TabActivity implementation ineffective?</p></li>
  <li><p>If the application is running in a single Activity that manages different views for each tab (and then different views WITHIN a tab when necessary), should I have one single enormous onClick method to handle all clicks from any clickable view, handling input based on which view is active?  Or should I register and de-register all of my Listeners programatically?</p></li>
  <li><p>With a single Activity, won't any click listener or any broadcast receiver be running all of the time, consuming resources even when unnecessary?</p></li>
  <li><p>With a single Activity, the back button would exit the entire app from any point in its functionality.  If I am using views, won't I have to consistently override onBackPressed() and carefully manage the app behavior to force it to behave "like an Android app?"</p></li>
  <li><p>AM I THINKING ABOUT THIS COMPLETELY WRONG?  It's possible that I am unintentionally attempting to recreate ActivityGroup and TabActivity functionality using views instead, when  I should be taking an entirely different design approach to using tabs and Views.</p></li>
  </ol>
  
  <p>When the people at Google say we shouldn't use activities as tabs anymore, and Mr. Mark Murphy so emphatically agrees, I'm inclined to believe.  I simply haven't been able to research-up a way to switch without resorting to recreating a lot of Activity functionality by hand (which would probably include a variety of dirty hacks).</p>
  
  <p>Appreciation in advance for anyone willing to tackle such a vague and overwritten topic.</p>