Which of the following codes will create a tabbed interface?
Reveal answer
Fill a bubble to check yourself
Which of the following codes will create a tabbed interface?
Android:actionProviderClass=”android.widget.ShareActionProvider”
Public void onCreate(Bundle bun1) {
Super.onCreate(bun1);
final ActionBar bar = getActionBar();
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
}
Public void onCreate(Bundle bun1) {
Super.onCreate(bun1);
final ActionBar bar = getActionBar();
bar.setNavigationMode(ActionBar.NAVIGATION_TABS);
}
Public void onCreate(Bundle bun1) {
Super.onCreate(bun1);
final ActionBar = getActionBar();
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
}
To create a tabbed interface, you have to set the navigation mode for the action bar in the onCreate method of your activity. The code is:
Public void onCreate(Bundle bun1) {
Super.onCreate(bun1);
final ActionBar bar = getActionBar();
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
}