I\'ve tried the Tab Layout example, and I\'ve also fixed the few typos in the example (and added all the activities to the manifest). However, when I run it on the emulator
Just want to say thanks to all that posted here. Solved my problem (the same as everyone else here). It was very frustrating to get this to work. They should have really simplified the example much better.
To try to sum up the changes needed.
Move all 3 activity classes to separate files. example I ended up using for my SongsActivity.java file (with eclipse error suggestions)
package com.example.HelloTabWidget;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class SongsActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView textview = new TextView(this);
textview.setText("This is the Songs tab");
setContentView(textview);
}
}