Q:

Using tabs to navigate between different xml layouts

I have been following this tutorial for setting up tabs in your application. http://developer.android.com/resources/tutorials/views/hello-tabwidget.html
In this tutorial it shows you how to set up tabs that display a dynamically created textview that is created in each activity's onCreate() method in java. There is only one xml layout in this example.
How do you set up tabs to navigate to different xml layouts? Do you need to have identical  and  in each xml file, and different layouts within the ?
Any help is appreciated.

A:

Since each tab is holding activity, that activity can have its own XML layout. 
public class ArtistsActivity1 extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main1);
      }
}

public class ArtistsActivity2 extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main2);
      }
}

intent1 = new Intent().setClass(this, ArtistsActivity1.class);
spec = tabHost.newTabSpec("artists").setIndicator("Artists",
                  res.getDrawable(R.drawable.ic_tab_artists))
              .setContent(intent1);
tabHost.addTab(spec);

intent2 = new Intent().setClass(this, AlbumsActivity2.class);
spec = tabHost.newTabSpec("albums").setIndicator("Albums",
                  res.getDrawable(R.drawable.ic_tab_albums))
              .setContent(intent2);
tabHost.addTab(spec)

