android honeycomb list menus - android

I feel stupid for asking: What are the drop menus on honeycomb apps called? I'd like to use them in my app but i don't even know where to start.
An Example from Google Music, notice the triangle in the corner:
Here it is opened:
I found the Menu, which appears in the top right. I don't think they are context menus which you usually see associated with long holding touches.
(I realize these images are from the website, but they are all over honeycomb apps too)

The action bar will display your Activity's options menu in the top right automatically, but PopupMenu might be what you're looking for. It lets you generate a simple popup menu anchored to any View in your UI. Inflate a menu resource into the Menu object returned by getMenu, set a listener to respond to the user making a choice from the menu and call the show method.

Related

What is the difference between Context menu vs Popup menu vs bottom sheet?

What are the differences between Context menu vs Popup menu vs bottom sheet?
and what kind of situations they are best fit for?
Option Menu Option Menus are the primary menus of android. They can be used for settings, search, delete item etc. we are inflating the menu by calling the inflate() method of MenuInflater class. To perform event handling on menu items, you need to override onOptionsItemSelected() method of Activity class.
Context Menu Android context menu appears when user press long click on the element. It is also known as floating menu.
Bottom sheets bottom sheet is a sheet of material that slides up from the bottom edge of the screen and presents a set of clear and simple actions
Please read this SO Answer difference-between-context-menu-and-option-menu-in-android
Bottom sheet is an Android component that present anchored views at the bottom of the screen. It became popular on Android 5, you can find more information in the Material Design documentation.
Popup menu is a dialog box linked to a concrete element in the UI, with it you can implement the Quick Actions UI pattern.
⦁ Pop-up menu/context Menu - A context menu (also called contextual, shortcut, and popup or pop-up menu) is a menu in a graphical user interface (GUI) that appears upon user interaction, such as a right-click mouse operation.
⦁ Fall-down menu - move the mouse over the menu to open it. In a computer, a drop-down menu is a menu that offers a list of options. The title of the menu, of the currently-selected item in the list, is always displayed. When the visible item is clicked, other items from the list "drop-down" into view, and the user can choose from those options.

Trying to make a menu on the bottom without using showasaction

If I don't use show as action=always when creating a menu will it create a menu on the bottom like the old school android phones. I'm trying to create something that has like the facebook mobile tabs on the bottom, and has them for every screen. Or should I actually just make tabs for every screen?
You may be interested in a "split action bar". That way your items could appear at the bottom. showAsAction controls how/if the item appear in the Action Bar.
More information here: http://developer.android.com/guide/topics/ui/actionbar.html#SplitBar
If that doesn't look of interest then yes.. you should use tabs (or a view of some sort) at the bottom to render your "menu items".

How is this "menu" called?

I want to implement this kind of "pop up menu" in my app but I have no idea how it is called and therefore I can't do any research on how to do it.
This is the picture
I want this menu to have three options, right now I'm using AlertDialog and the buttons are right next to each other (positive, negative, neutral), but I'd rather use this kind of pop up menu since it can have more buttons and looks more professional.
I'm not asking for the code or anything, I just want to know how this menu is called so that I can do my research then.
What you are looking for is a Context Menu. There are two options, a floating context menu (like the one on your image), or the contextual action mode (shows the options on an ActionBar, like the GMail app for example).
You can choose which one is more appropriate for your app, but the official documentation states:
If you're developing for Android 3.0 (API level 11) or higher, you
should usually use the contextual action mode to present contextual
actions, instead of the floating context menu.
User Marcelo gave me an answer.
This is what I was looking for

Dropd down tabs or drop down menus beneath ActionBar in Android

My need is to add a drop down menu like the one shown in attached image link.
http://i.imgur.com/cWtykfN.jpg
I don't know what to be used, whether it is tabs or menus. My need is when I press the last tab/menu, the sub menu should be shown and I could be able to handle the corresponding actions. Even when I handle those menus, I should be able to show the top tab/ menu without interruption.
It's called as overflow menus. Look this example, you will get an idea.
http://wptrafficanalyzer.in/blog/adding-action-items-and-overflow-menu-items-to-action-bar-in-android/
And nice explanation been given here. http://blog.stylingandroid.com/archives/1249 and for source code.ref here: https://github.com/StylingAndroid/StylingActionBar/Tree/StylingPart2
Use the ActionBar with tab-navigation-mode and if the last tab is clicked you could simply trigger a PopupMenu (even though this seems a little weird and is not what I expect to happen when I click tab).

ActionBarSherlock: Programmatically show / hide Action Item buttons via a method call

I am using ActionBarSherlock. I wish to be able to make two buttons appear in the Action Bar in response to a certain user operation. The user operation is completely unrelated to the Action Bar. The visibility of the buttons needs to be controlled by calling a method. Also, response to clicking those buttons shall be handled by my own application code.
The buttons shall ideally look just like those that are created when defining menu items as Action Items using android:showAsAction="ifRoom|withText", as illustrated here.
My problem is that as far as I can tell, the standard ActionBar API provides no such mechanism to show or hide Action Item buttons at will, and the only time that the menu items can be defined is within onCreateOptionsMenu() which is of course called by the system.
My belief is that the only way I'm going to add buttons like this and show / hide them at will is to create a custom layout for them and make use of .setCustomView() to place them into the Action Bar. Would people generally agree with that, or is there something I have missed?
If I do go down the route of using .setCustomView(), I would like my buttons to look identical to Action Item buttons that ActionBarSherlock displays for a menu item that has the attribute android:showAsAction="ifRoom|withText". To do this, can anyone advise me which particular theme, style, or layouts from within the ActionBarSherlock library I should make use of? I have already tried to use R.layout.abs__action_menu_item_layout, but attempting to inflate this layout produces an exception relating to a colorStateList when attempting inflation of the CapitalizingButton that the layout contains.
You can call setVisibility on the MenuItem instances.
The documentation states that "You can safely hold on to menu (and any items created from it), making modifications to it as desired, until the next time onCreateOptionsMenu() is called."
If you want those two buttons to have the look and feel of menu items, then you should make them menu items. Your assumption that menu items can only be defined in onCreateOptionsMenu() is incorrect, because there's also a method called onPrepareOptionsMenu(), that will be called each time right before the menu is shown. Together with an activity's invalidateOptionsMenu() method, you can easily create a menu dat reflects the current state in realtime.
The alternative is to keep a reference to the individual MenuItem objects, as the documentation states its save to hold on to those, and change their visibility when appropriate. You may still have to call invalidateOptionsMenu() to update the menu- I can't remember from the top of my head. (Edit: Jake beat me to it on this one)
Personally, I prefer the first approach, since you keep all menu-related logic grouped together and the visibility is based on some sort of state/model. The second option may be more straightforward to implement, depending on your current code, but may result in menu-stuff all over the place.
have you checked the demo samples ?
they have this feature there on "feature toggles" .

Categories

Resources