Android Action Bar and Tab Navigation

Tests knowledge of Android Action Bar, Tab navigation modes, ShareActionProvider, ViewPager, and related UI components in the Android View Framework

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

The ___________ is automatically added to your app if it is using one of the Holo themes.

  1. Menu bar
  2. Title bar
  3. Toolbar
  4. Toolbar
Question 2 Multiple Choice (Single Answer)

Which of the following Android versions does not support action bar API?

  1. Android 4.0
  2. Android 3.0
  3. Android 4.2.2
  4. Android 2.0
Question 3 Multiple Choice (Single Answer)

It is recommended that the android:showAsAction attributes to ________, which will display the menu item as an action item only if there is enough room on the display.

  1. withText
  2. ifRoom
  3. ifNotRoom
  4. withRoom
Question 4 Multiple Choice (Single Answer)

What is the working of the following code?

android:showAsAction=”collapseActionView”

  1. This will collapse the action view into just an action item.
  2. This will completely collapse the action view.
  3. This will completely collapse the action item.
  4. The search widget would consume space on the action bar even when it is not in use.
Question 5 Multiple Choice (Single Answer)

The service from which we share images, text file, etc. through mail, facebook , bluetooth is

  1. ShareService
  2. ShareServiceProvider
  3. ShareActionProvider
  4. Sharing
Question 6 Multiple Choice (Single Answer)

When we have a large number of navigation options, then which of the following modes is suitable?

  1. Tab navigation mode
  2. Viewpager
  3. List navigation mode
  4. Tabwidget
Question 7 Multiple Choice (Single Answer)

Which of the following statements is/are correct?

A. ActionProvider is a new class available in Android 4.0.
B. The action bar is a way to quickly add functionality to your application, while maintaining a native platform look and feel.

  1. Only A
  2. Only B
  3. Both A and B
  4. Neither A nor B
Question 8 Multiple Choice (Single Answer)

Which of the following interfaces/classes is used to implement/define the methods onTabSelected, TabUnselected and onTabReselected?

  1. ActionBar
  2. ActionBarListener
  3. ActionProvider
  4. TabListener
Question 9 Multiple Choice (Single Answer)

Which of the following classes is used to add the tabs to a subview of your app?

  1. ActionBar
  2. TabWidget
  3. ViewPager
  4. Tab
Question 10 Multiple Choice (Single Answer)

Which of the following codes is used to enable a split action bar on an activity?

  1. xml <activity> android:name=”.SampleActivity” android:uiOptions=”splitActionBar”> </activity>
  2. xml <activity> android:name=”.SampleActivity” android:uiOptions=”splitActionBarWhenNarrow”> </activity>
  3. xml <activity> android:name=”.SampleActivity” android:uiOptions=”splitActionBarNarrow”> </activity>
  4. xml <activity> android:name=”.SampleActivity” android:Options=”splitActionBarWhenNarrow”> </activity>
Question 11 Multiple Choice (Single Answer)

In ___________, the user drags the entire display on the left to the right to switch pages.

  1. TabHost
  2. TabWidget
  3. ViewPager
  4. ActionBar
Question 12 Multiple Choice (Single Answer)

Which of the following statements is/are correct?

A. The getCount() returns the number of items in the pages.
B. The. getItem() returns the fragment at the specified position.

  1. Only A
  2. Only B
  3. Both A and B
  4. Neither A nor B
Question 13 Multiple Choice (Single Answer)

How can we add the tabs and their listeners to the action bar?

  1. java Tab t1=bar.newTab(); t1.setText("Tab Text&");
  2. java Tab t1=bar.newTab(); t1.setTabListener(this);
  3. java Tab t1=bar.newTab(); t1.setText("Tab Text"); t1.setTabListener(this);
  4. java Tab t1=bar.newTab(); t1.setText("Tab Text"); t1.setTabListener(this); bar.addTab(bar.newTab());
Question 14 Multiple Choice (Single Answer)

What is the correct sequence to create a tab-style interface?

  1. TabHost
  2. TabWidget
  3. LinearLayout
  1. 123
  2. 321
  3. 132
  4. 312
Question 15 Multiple Choice (Single Answer)

Which of the following codes will create a tabbed interface?

  1. java Android:actionProviderClass=”android.widget.ShareActionProvider”
  2. java Public void onCreate(Bundle bun1) { Super.onCreate(bun1); final ActionBar bar = getActionBar(); bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); }
  3. java Public void onCreate(Bundle bun1) { Super.onCreate(bun1); final ActionBar bar = getActionBar(); bar.setNavigationMode(ActionBar.NAVIGATION_TABS); }
  4. java Public void onCreate(Bundle bun1) { Super.onCreate(bun1); final ActionBar = getActionBar(); bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); }