android pop up menus

与世无争的帅哥 提交于 2019-12-03 13:02:18

问题


I cannot find either one of these two views in the source, but have seen them both in many apps. Can anyone please tell me what they are called?

Thanks


回答1:


The second one is an options menu from the action bar. I think it is implemented as a ListPopupWindow.

The first one is not part of the Android SDK, though there are various implementations floating around. Here is an example of one designed for use with Google Maps, for example. Here is one designed for the "quick actions" pattern.




回答2:


I'm going to assume that they're custom made ones, so you won't find them in the standard Android libraries.




回答3:


The second one I think is just the way that the default menu looks in ICS (and honeycomb for that matter). If you build for 4.0 and include the code for an options menu I think you'll get that UI by default. If you are looking to customize it check out this page http://developer.android.com/guide/topics/ui/actionbar.html and pay close attention to the "Adding drop down navigation" section.

The first one is not a part of the android UI, that is something specific to the facebook app.



来源:https://stackoverflow.com/questions/8595716/android-pop-up-menus

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!