Which call shows the Up (←) arrow in the action bar?

  1. supportActionBar?.showBack()
  2. finish()
  3. toolbar.upEnabled = 1
  4. supportActionBar?.setDisplayHomeAsUpEnabled(true)
Answer

D) supportActionBar?.setDisplayHomeAsUpEnabled(true)

setDisplayHomeAsUpEnabled shows the Up button.

Computer Science MCQ · More Action Bar and User Interface Design MCQs · Practise