Question about Android View
First off I'm new to owning an android and trying to develop android apps. I've noticed that sometimes in applications and in the local android apps that sometimes when you a long press or sometimes just tap a menu comes up. This menu isn't like a context menu bc there is no title. Just a white list of options, and in others it seems to be completely custom but once again开发者_开发技巧 no Black Bar title on top of it. If anyone knows the name of this view could you let me know. Thanks
You are right ContextMenus
are shown on long presses only. Everything else you saw is either a Dialog
or a custom view. You define menus like described in the android developer articles:
http://developer.android.com/guide/topics/ui/menus.html
If you want to completely customize some sort of menu you could also just use a Dialog
and add every view element you want.
It's in fact a context menu... the only difference is that it does not have a title. Take a look at the registerForContextMenu
.
精彩评论