When I bring up the context menu on a contact in the Android built-in app, the context menu has a title (the contact's name). Same for playlist context menu in the Music app.
I have added a context menu to an ImageView (no list item). There is no title, just the options are shown. Is there an easy way to set a title so that my context menu looks like the built-in apps' ones?
Right-click the list header and configure list control. You should be able to change both of these options. Use the 'Label' field to change the list label and the 'Omit new', 'New roles', or 'Omit new condition' fields to remove the 'New' button.
A. Pressing Shift-F10 will bring up the context menu for any selected item.
A context menu (also know as a contextual menu, shortcut menu or pop-up menu) is the menu that appears when you right-click and offers a set of choices that are available for, or in context of, whatever it was you clicked. The available choices are usually actions specifically related to the selected object.
The context menu (right-hand mouse button or SHIFT+F10 ) allows you to display a context-sensitive menu. The context is defined by the position of the mouse pointer when the user requests the menu. A context menu allows the user to choose functions that are relevant to the current context.
You want to use setHeaderTitle(CharSequence title).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With