Load separate activites when switching tab with TabHost
<pre><code>    TabHost tabHost = getTabHost(); 
    TabHost.TabSpec spec;  // Resusable TabSpec for each tab
    Intent intent;  // Reusable Intent for each tab
    // Create an Intent to launch an Activity for the tab (to be reused)
    intent = new Intent().setClass(this, FirstActivity.class);
    // Initialize a TabSpec for each tab and add it to the TabHost
    spec = tabHost.newTabSpec("hottest").setIndicator("Hottest",
                      res.getDrawable(R.drawable.ic_tab_hottesttrack))
                  .setContent(intent);
    tabHost.addTab(spec);
    intent = new Intent().setClass(this, SecondTrackActivity.class);
    spec = tabHost.newTabSpec("latest").setIndicator("Latest",
                      res.getDrawable(R.drawable.ic_tab_latesttrack))
                  .setContent(intent);
    tabHost.addTab(spec);
</code></pre>

<p>Okey! My code is simple. Make 2 tabs and add them into TabHost. The problem is both of my Activities used heavy amount of memories and require time to process. Only one activity should be loaded at one time. However when I start my application, it seems both activities are loaded which will take longer time.
So I want only ONE activity allowed to be loaded upon choosing its tab, simply put if I choose first tab then first activity load, I choose second tab then second activity will load, not both. Any suggestion?</p>
