Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Object menu

An object menu is a menu that lets the user directly manipulate objects without having to open them and navigate deeper into a view hierarchy.

  • Deleting a photo by selecting its thumbnail, instead of by opening the full image first.
  • Flagging an email by selecting its preview instead of by first opening the email.
  • Calling a contact by selecting their name, instead of by opening their detailed contact information then pressing a "Call" button.

Object menus are currently implemented as a special case of action menu; this will evolve over time. For now, see the action menu coding guide for information on how to implement an object menu.

Characteristics

  • Object menus are accessed using a "press-and-hold" gesture on a selectable object, such as a list row, phone number, URL, or the like.
  • An object menu contains one or more items.
  • Object menus expand in height to accomodate their contents, to a maximum of the height of the screen; at that point, the contents of the menu scroll. As a rule of thumb, you should try to avoid having more than five items in the menu.
  • Unlike action menus, object menus do not have titles.
  • You implement object menus using the same code and style as for action menus.

Visuals

Idle state

The opened object menu waiting for the user to tap a selection.

Pressed state

The appearance of the menu while the user's finger is pressing the button "Option 03".

Interaction

Here you see a user press-and-old on an email message. As a result, an object menu appears prompting the user with various tasks they can perform on that message.

See also

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, Sheppy
 Last updated by: chrisdavidmills,