Questions tagged [menu]

A menu is a user interface mechanism that provides the user a means to view and execute application operations. (Generic; please use platform and/or language tags when possible instead)

A menu is a user interface mechanism that provides the user a means to view and execute application operations. Menus can be simple lists, or can be hierarchical with sub-menus. Typical menu types include drop down menus that are accessed from a menu bar and context menus that are accessed by clicking on a control. Menus often have accelerator keys which provide the user a quick way to open a menu or execute a menu operation.

Definition and Usage

In HTML:-

  • The <menu> tag defines a list/menu of commands.
  • The <menu> tag is used for context menus, toolbars and for listing form controls and commands.
15814 questions
262
votes
15 answers

How to copy text programmatically in my Android app?

I'm building an Android app and I want to copy the text value of an EditText widget. It's possible for the user to press Menu+A then Menu+C to copy the value, but how would I do this programmatically?
Zach
  • 24,496
  • 9
  • 43
  • 50
233
votes
13 answers

How to change menu item text dynamically in Android

I'm trying to change the title of a menu item from outside of the onOptionsItemSelected(MenuItem item) method. I already do the following; public boolean onOptionsItemSelected(MenuItem item) { try { switch(item.getItemId()) { case…
Garbit
  • 5,805
  • 6
  • 39
  • 72
207
votes
6 answers

Changing Locale within the app itself

My users can change the Locale within the app (they may want to keep their phone settings in English but read the content of my app in French, Dutch or any other language ...) Why is this working perfectly fine in 1.5/1.6 but NOT in 2.0 anymore…
Hubert
  • 16,012
  • 18
  • 45
  • 51
203
votes
13 answers

CSS: bolding some text without changing its container's size

I have a horizontal navigation menu, which is basically just a
    with the elements set side-by-side. I do not define width, but simply use padding, because I would like the widths to be defined by the width of the menu item. I bold the…
Mala
  • 14,178
  • 25
  • 88
  • 119
181
votes
1 answer

XSLT getting last element

I am trying to find the last element in my xml, which looks like:
Nik
  • 9,063
  • 7
  • 66
  • 81
145
votes
4 answers

Android custom dropdown/popup menu

How do I do a custom dropdown/popup menu anchored to a button? I need it to work like the popup menu (anchored to a view), and do something when I click an item from the menu. How do I add items to the menu by code, keeping menu's height and make…
stanete
  • 4,062
  • 9
  • 21
  • 30
119
votes
4 answers

Android: create a popup that has multiple selection options

I've been searching around trying to figure out how to create a popup or a dialog that has 4 options to choose from. I see this picture on the Android developer site: Does anyone know how to code up something like the one on the right? I don't…
Cornomaniac
  • 1,193
  • 2
  • 7
  • 4
108
votes
5 answers

W3Schools.com and I'm pretty sure I remember seeing W3C.org state that should be used for Toolbar menus and listing form control commands. So, which one should I use for my main menu? Nav, or Menu? Does it matter?
anon271334
103
votes
14 answers

How to get selected value of a dropdown menu in ReactJS

I'm using react and I want to get the value of the selected option of a dropdown in react but I don't know how. Any suggestions? thanks! My dropdown is just a select like: