按钮自定义菜单单击作为下拉 [英] Custom Menu on button click as drop down

查看:199
本文介绍了按钮自定义菜单单击作为下拉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现的flipkart应用程序的操作栏功能。

I am trying to implement the action bar functionality of the flipkart app..

为此,我已经成功地创建一个自定义的操作栏,但我面对的显示菜单,下拉上溢图标点击的问题。

For this I have successfully created a custom Action Bar but I am facing problems in showing the menu as drop down on overflow icon click.

如果我尝试按钮 Android的选项菜单中点击然后我收到菜单而不图标(4.2.2)在我的屏幕底部的中心。使用自定义对话框或警报对话框消失的背景,他们也出现在屏幕中央。

If I try Android Option Menu on button click then on I am getting the menu without icons (4.2.2) at the bottom center of my screen. Using a custom dialog or alert dialog fades the background and they also appear on the center of the screen.

我应该怎么做才能得到类似的功能显示的图像上面?

What should I do to get the functionality similar as shown in the image above?

推荐答案

试试这个办法,希望这将帮助你解决你的问题。

请跟随链接指令来显示弹出菜单项与形象,你可以使用showAtLocation()来显示弹出式的理想位置。

Please follow link instruction to shown popup menu item with image and you can use showAtLocation() to shown popup as desired location.

查看: PopupMenu的带图标

这篇关于按钮自定义菜单单击作为下拉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆