MyCode:
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInsta
you need change MainActivity's base class from Activity to ActivityGroup, as follows:
public class MainActivity extends ActivityGroup {
...
}
ActivityGroup will take care of an instance of LocalActivityManager. So you don't need to create it. After the base class is changed, just call getLocalActivityManager() function defined in the base class to get that instance. Call tabHost's setup function like this:
tabHost.setup(this.getLocalActivityManager());
Instead of setup():
LocalActivityManager mLocalActivityManager = new LocalActivityManager(this, false);
setup(mLocalActivityManager);