I'm try to customize my app popup menu adding separators and icons.
Basically I would like to obtain a menu like this (from Google Photos app):
How can I achieve this?
Thank you all in advance :)
I dont think there is a straightforward way to add separators and icons to popup menu.
I suppose, you have to use PopupWindow. Using PopupWindow, you have to design the layout. So you can design it the way you want, like having icons and separators. But the catch here is, you have to position the PopupWindow using x,y and gravity parameters, and also the fade-in animation.
https://developer.android.com/reference/android/widget/PopupWindow.html
you can use multiple row in listview to obtain the design,
look at this example: http://www.survivingwithandroid.com/2014/08/android-listview-with-multiple-row.html
Related
Hi Everyone
I'm new in android and i'd like to do a menu for an application.
I want to replicate the menu style of this game that has different section
http://i.giphy.com/l4Jz4PbvjJEZHZn8c.gif
I have 3 different xml layout that i want to show in my horizontal style menu capable of swiping from a layout to another.
I have heard i could use something called horizontal ListView but i don't really know how to use it.
How do i do?
try Sliding tab Layout. Its the same function just need to edit the codes for different design
I went through many questions regarding making bottom bar but my my question is a bit different.I want to make this.
bottom menu:
Now the thing is, the menu is not static.It's items can vary depending upon user's choice.So, I have to make it dynamic. What's the best approach to achieve this?
Also, I'm not sure how do I make that curved outline at the center item.I'm thinking that I should do it programmatically.Any suggestions are welcome.Even better if you can share code.
Use this to create Navigation bar, it will surly create view that you show us in image.
https://github.com/armcha/Space-Navigation-View
Bottom menu is now an official navigation view according to the official documentation but as far as I know, there is no native component available yet to implement that.
In my opinion, your best bet is to try customizing the following library created by Iiro Krankka (http://github.com/roughike):
BottomBar
I'm trying to find some information on how to create a menu that looks like the top of the menu for chrome for Android. I have tried experimenting with implementing icons for Android 4.0, but no luck. Tried googeling, but the only thing i found was an answer that said icons can't be implemented when API >= 11.
How does Chrome do it then? It's made for devices that's 4.0+!
Use popup list window to achieve this. As you can add header and footer to any list, you can create one linear layout with back forward and star like options.. Add that view to the popup window.
Any ListView can be associated with HeaderViewListAdapter, using this you can attach seperate layouts as a header and or footer to your listViews.
As Vinodkumar said, you can also use ListPopupWindow with HeaderViewListAdapters.
In the Android reference: HeaderViewListAdapter and ListPopupWindow
I want to create something similar to this picture where you select the action view and it brings up a dropdown list of items, is that just a submenu of the menu item or something else?
The easiest way to do that is probably to bundle in the GreenDroid library and use their solution: https://github.com/cyrilmottier/GreenDroid
Although this could also be accomplished with a basic LinearLayout containing a few buttons.
My guess id that you could do it with a new activity with the options. Normal dialogues are created this way. Then use the adequate layout to make it look like this. You can get the sources for the Option dialogue from the android source code and then style it accordingly.
Hope it helps.
It's looks like just a Spinner as ActionView with it's own adapter.
I am wondering where the default ContextMenu style is defined... to copy/use it!
I have few ListView in my app, using the provided TexView layout android.R.layout.simple_list_item_1. My listings are looking odd (black background) compare to the default ones like the ContextMenu (white background).
So if you know where it is, or how to make my ListView having a "standard" style, I would be glad to know about it ;)
Thanks
jo
I think the Context Menus look identical to the regular Options Menu. And those menu items are setup with a layout found at:
$(SDK_ROOT)/platforms/android-$(API_LEVEL)/data/res/layout/menu_item.xml.