-3

From a user-interface perspective, why is there a title option to an AlertDialog? Why doesn't the message alone suffice? Do we really need a title? If so, please provide visual examples of where a title would be useful.

The AlertDialog documentation shows an AlertDialog without a title, and it looks perfect to me:

AlertDialog without title

Jeff Axelrod
  • 27,676
  • 31
  • 147
  • 246
  • 1
    I didn't downvote or vote to close, though I think it's the following: *"why is there a title option to an AlertDialog? [..] Do we really need a title?"* is really subjective. Every opinion counts, there is no right answer - this is not a good fit for SO as stated in the FAQ (hence "not constructive" votes). Also the answer you've given just states *what* should be in the title, not *why* the title option exists in the first place. It does not really answer your question. –  Aug 28 '12 at 18:14
  • @alextsc from the official Android design guidelines: *Most alerts don't need titles. Usually the decision doesn't have a severe impact and can be summed up succinctly in a sentence or two.* – Jeff Axelrod Aug 28 '12 at 18:17
  • @JeffAxelrod - Are you saying that your answer does answer the question, or does not? – mbeckish Aug 28 '12 at 19:36

1 Answers1

6

The Android Design guide on Alerts says:

Alerts

Alerts inform the user about a situation that requires their confirmation or acknowledgement before proceeding. They differ slightly in appearance based upon the severity and impact of the message conveyed.

Alerts without title bars

Most alerts don't need titles. Usually the decision doesn't have a severe impact and can be summed up succinctly in a sentence or two. The content area should either ask a question (such as "Delete this conversation?") or make a clear statement whose relationship to the action buttons is obvious.

Dialog with no title

Alerts with title bars

Keep the question or statement short: for example, "Erase USB storage?" Avoid apologies. A user should be able to skip the content completely and still have a clear idea of what choices are available based on the title and the text of the action buttons.

Dialog with title

When crafting a confirmation dialog, make the title meaningful by echoing the requested action.

Don't:

  • Are you sure?
  • Don't
  • Warning!

Do:

  • Erase USB storage?
Jeff Axelrod
  • 27,676
  • 31
  • 147
  • 246