26. A SearchView inside the app bar is an example of an:
- Action view
- Toast
- Context menu
- Overflow item
Answer: A) Action view
Explanation: Action views embed widgets in the app bar.
MCQs / Computer Science / Action Bar and User Interface Design
34 multiple-choice questions on Action Bar and User Interface Design from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.
Answer: A) Action view
Explanation: Action views embed widgets in the app bar.
Answer: B) 3.0 Honeycomb
Explanation: Honeycomb added the Action Bar for tablets.
Answer: B) onCreateOptionsMenu()
Explanation: onCreateOptionsMenu inflates the menu XML.
Answer: B) res/menu
Explanation: Menu XML files live in res/menu.
Answer: D) Action bar / app bar
Explanation: The action bar (app bar) shows title, Up button, actions and overflow.
Answer: B) The click has been handled
Explanation: Returning true consumes the event.
Answer: C) setSupportActionBar(toolbar)
Explanation: setSupportActionBar() installs the Toolbar as the app bar.
Answer: D) Long-presses a view registered for a context menu
Explanation: Floating context menus appear on long press.
Answer: D) AlertDialog / MaterialAlertDialogBuilder
Explanation: Alert dialogs show a title, message and buttons.
Previous Page 2 of 2
Practise Action Bar and User Interface Design MCQs