I'm trying to figure out how to create a User Information dropdown menu exactly like what evernote uses in the screen shot below.
Dropdowns and normal spinners don't seem to support a Header value where the Username is.
Does anyone have any ideas how to to implement something like this with a header, custom fields in the dropdown list and spinner icon in bottom right of header.
Also, the sample at http://developer.android.com/guide/topics/ui/actionbar.html#Dropdown is not what I need unless it can be expanded for header and custom entries.
Supporting Android 3.1+
Here's the screenshot
Related
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".
I am working on an Android application where I have to design a menu which will populate from the action bar, like this:
I have tried my best but was not able to produce it using the Android controls.
The solutions I have tried are:
With Actionbar, add a menu item with a group with selectable="all", that produces the layout I need but when I click a checkbox for selecting it, the whole menu hides and selection is not done, moreover the menu icon in actionbar does not have the bottom right white arrow.
Tried creating a custom ActionProvider and added the menu items using class's OnPrepareSubMenu method but had the same issue.
I just need a push in the right direction and I can do the rest, suggestions are more than welcome.
Thank you :)
Use popupWindow.
In that you can make any custom layout and set it as content of your popupwindow and also you can specify an ANCHOR in your case it would be
R.id.your_menu_item
set a listener and listen the changes.
I've made a navigation drawer in my app. Inside my navigation drawer is a ListView. It's a simple list view with text items. The Gmail android app has a ListView with headers.
(source: phonedog.com)
As you can see, the words: INBOX, RECENT LABELS, ALL LABELS are headers. I would like to implement exactly those type of headers into my app. Is this feature an inbuilt android thing or do I have to create something custom. If yes then how.
Let me know if you need any more info.
Thanks in Advance.
I'd like to use a drop-down menu for letting the user choose an action (in this case, they select some items from a list, and use the menu to select "delete", "move" etc.)
The way Spinner works is quite close to what I want, except Spinner is clearly designed for selecting some data, rather than issuing a command.
Before it is clicked, I'd like the drop-down menu to just look like an arrow (no adjacent space for displaying the 'currently selected' data
Ideally the drop-down menu would appear directly beneath the arrow, rather than in the middle of the screen.
Items in the menu shouldn't have a radio button to indicate whether they are selected
Is there a component that is more appropriate for this than Spinner, or should I achieve these goals by tweaking a Spinner?
You should use a ContextMenu to do what you are looking for. In the dev guide there is a page about menus and a section about ContextMenus that will help with the implementation. If you put some time in skinning this menu you can change the look to match what you want.
may be i not getting you but You can use actionsheet which you can handle as you want
I would like to add a custom pulldown menu to the actionbar in my project similar to the one that can be found in the google books app (screen).
In this case it represents the complete table of contents of the book.
I tried to follow the guide from the developer site where there is an example with a SpinnerAdapter. But when i use a custom Layout (in my case a RelativeLayout with two TextViews in it) i get an Exception that saying "ArrayAdapter requires the resource ID to be a TextView". So i dismissed my idea with the pulldown but then i found the pulldown in the books app wich looks to me like they used a custom layout as well because it looks to me like two single TextViews in one Layout.
Could anybody please enlighten me if what i want to do is even possible and how?
To me, that looks like the options menu -- that's where options menu items not promoted to the action bar itself appear. Use onCreateOptionsMenu() and add whatever items you want to the Menu.
EDIT:
Sorry, the screenshot was a bit confusing. There are two possibilities that I can see:
This could be a submenu for that action bar item -- I haven't played with submenus and the action bar yet (though this reminds me that I need to do that...)
This could be a PopupMenu tied to a custom action bar View