Setting the Default

At this point, you need to identify which tab to show by default. To do this, you call the setCurrentTabByTag() method and pass in the tag name of the tab: host.setCurrentTabByTag("allTab");

Save the QuizScoresActivity.java file and run the application in the Android emulator. If you navigate to the scores screen, you see the two tabs, but you still have no score data to display.

"OUtr

If you have a screen that only displays a TabHost control, consider using the TabActivity class to simplify management of the TabHost control.

0 0

Post a comment