简体   繁体   English

android弹出菜单

[英]android pop up menus

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 谢谢 在此输入图像描述

The second one is an options menu from the action bar. 第二个是操作栏中的选项菜单。 I think it is implemented as a ListPopupWindow . 我认为它是作为ListPopupWindow实现的。

The first one is not part of the Android SDK, though there are various implementations floating around. 第一个不是Android SDK的一部分,尽管有各种各样的实现浮动。 Here is an example of one designed for use with Google Maps, for example. 例如,以下是一个用于Google地图的示例。 Here is one designed for the "quick actions" pattern. 这是一个专为“快速动作”模式设计的。

我将假设它们是定制的,所以你不会在标准的Android库中找到它们。

The second one I think is just the way that the default menu looks in ICS (and honeycomb for that matter). 我认为第二个就是默认菜单在ICS中看起来的方式(以及那个问题的蜂窝)。 If you build for 4.0 and include the code for an options menu I think you'll get that UI by default. 如果您构建4.0并包含选项菜单的代码,我认为默认情况下您将获得该UI。 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. 如果您要自定义它,请查看此页面http://developer.android.com/guide/topics/ui/actionbar.html并密切关注“添加下拉导航”部分。

The first one is not a part of the android UI, that is something specific to the facebook app. 第一个不是Android UI的一部分,这是Facebook应用程序特有的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM