Solusi: 'aktivitas dumpsys shell adb' tidak berfungsi dengan TabActivity. Saat setiap item tab dipilih, aktivitas terkait akan diluncurkan. Tetapi ketika menggunakan 'adb shell dumpsys activity', aktivitas 'main' selalu dikembalikan:
public class main extends TabActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
Log.e("xyz", "start main...............");
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Resources res = getResources();
TabHost tabHost = getTabHost();
TabHost.TabSpec spec;
Intent intent;
intent = new Intent().setClass(this, widgets.class);
spec = tabHost.newTabSpec("Widgets").setIndicator("Widgets", res.getDrawable(R.drawable.tab1)).setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, layouts.class);
spec = tabHost.newTabSpec("Layouts").setIndicator("Layouts",res.getDrawable(R.drawable.tab2)).setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, composite1.class);
spec = tabHost.newTabSpec("Composite").setIndicator("Composite",res.getDrawable(R.drawable.tab3)).setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, imageMedia.class);
spec = tabHost.newTabSpec("Image_Media").setIndicator("Image&Media",res.getDrawable(R.drawable.tab4)).setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, timeDate.class);
spec = tabHost.newTabSpec("Time_Date").setIndicator("Time&Date",res.getDrawable(R.drawable.tab5)).setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, transitions.class);
spec = tabHost.newTabSpec("Transitions").setIndicator("Transitions",res.getDrawable(R.drawable.tab6)).setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, advanced.class);
spec = tabHost.newTabSpec("Advanced").setIndicator("Advanced",res.getDrawable(R.drawable.tab7)).setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, others.class);
spec = tabHost.newTabSpec("Others").setIndicator("Others",res.getDrawable(R.drawable.tab8)).setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, Dynamic.class);
spec = tabHost.newTabSpec("Dynamic").setIndicator("Dynamic",res.getDrawable(R.drawable.tab2)).setContent(intent);
tabHost.addTab(spec);
tabHost.setCurrentTab(0);
}
}