add menu item to android applicaton - android

Is it possible to have something similar like Blackberry in Android:
link text
I want to add a menu item particularly to the Contacts Option menu.
please let me know if this can be done in android.

Can you specify more clearly what you're trying to achieve / where you want to add the menu.
The menu that appears when you press the menu button on BB is equivalent to the menu options that come up when you press the menu button on Android.
Talking about the Contact application on Android, this would be the menu with the menu items "Search, Display options, Get Friends, My Profile, ..." in the Contact app's list view.
Take a look at http://developer.android.com/reference/android/view/Menu.html

Related

What kind of Android component is used for Gmail selected item menu

I am having trouble remembering what kind of Android component is being used to make the selected list item menu in their Gmail app. That is, when I open the app and see the list of emails in the inbox, I can long-press one of the items, and some sort of list shows up in the top of the screen, sort of like a context menu, with actions I can perform on the selected item(s). I would like to replicate similar functionality in one of my own apps. If I recall correctly there is a way of doing this using some standard Android UI component, but I'm having trouble finding what that is. Any pointers?
You're looking for a contextual actions bar. Details on how to create one are stored under the menu section of the documentation as they relate to action items.

Don't close Option Menu when a menu item is pressed

For an options menu, I have 5 buttons, and would like the menu to stay present if one specific button is pressed. How may this be accomplished. Thanks!
Looking at the Android docs, I see there is a relevant constant FLAG_PERFORM_NO_CLOSE, but I am not sure how to apply it.

how do display the another set of menu-items by selecting particular menu from menu list?

In my application I am having 3 menu like options,setting and favorites. In that If I press 'favorites' means it should display another set of (new)menu and I want to hide the previous set of (old)menu. IS it possible with android? If anyone knows, help me please.
I'm not sure if this is possible, but it's not the bast idea to do such things. Main reason - this behavior will be unexpected for user.
On selecting option menu item you should show alert dialog with possible choices.
Offtopic: According new design guidelines Android will delete "menu button", and all actions will appear on action bar. May be this will be better for your purposes.

Android make a case sensitive menu option

I want is a go from a menu that has a list of objects, if you select an option menu another list should appear.
The examples I found seemed to be for listview or webview.
There another way to make a selection from menu options?
So if I'm understanding your right, you want to launch a Context Menu from an Options Menu. You should not do this. From the android documentation:
A context menu is conceptually similar to the menu displayed when the user performs a "right-click" on a PC. You should use a context menu to provide the user access to actions that pertain to a specific item in the user interface. On Android, a context menu is displayed when the user performs a "long press" (press and hold) on an item.
You'd never do a "long press" on an Options Menu item. People just aren't used to doing that.
Try launching another activity instead or using a dialog.
If you have a fixed list of options in mind you might be looking for submenus, which are explained here: http://developer.android.com/guide/topics/ui/menus.html
If you are looking to dynamically build a list of options with an adapter you might find AlertDialog.Builder useful along with its setAdapter method.

How can i force an option menu to show up on android?

I have created an option menu for my app, but i want it to show up at the application start and be never hidden by any user control.
How can I? Is there a solution or i have to draw a custom menu in the layout?
How can I?
Don't make it an options menu. Use buttons or something.
If you want something to look like an options menu, please have it behave like an options menu, appearing when the user presses MENU and disappearing when the user makes a choice. Conversely, if you do not want it to behave like an options menu, then it should not look like an options menu, as that will confuse the user, wondering why your application or their phone is broken.
You have to place it in your layout.

Categories

Resources