Android的定制选项菜单项

问题描述:

大家好!我对Android的人的问题。任何帮助或建议将AP preciated。

everyone! I have question for Android guys. Any help or suggestion will be appreciated.

所以,我的问题:

我有应用程序ActionBarCompat并在行动吧我有很多不同的隐伏的菜单项,这似乎只有在操作栏中用户点击菜单按钮。另外我有在操作栏,它总是可见的。

I have application with ActionBarCompat and in this action bar I have a lot of different hiden menu items, which appear only if user click on menu button at action bar. Also I have couple menu items at action bar, which always visible.

我需要一些定制可见的菜单项之一。当这个菜单项用户点击(让我们说这将是添加新的菜单项),我需要显示不同的菜单在这种情况下。如果用户点击非标准菜单项,就应该像平时。

I need some customization for one of visible menu item. When user click on this menu item (let's say it would be "Add new" menu item), I need to show different menu in this case. And if user click on standart menu item, it should act like usually.

所以,我真的很困惑。我不知道我怎么能做到这一点。也许有人有同样的问题或类似的。谢谢!

So I really confused. And I have no idea how I can do it. Maybe someone had the same problem or similar. Thank you!

截图更好地理解:

您可以通过教程从几个不同的供应商而被如此建议如下:

You can go through the tutorial from several different providers as follows which are recommended by SO

Android开发者
Vogella
AndroidHive

Android Developer
Vogella
AndroidHive

他们都有很好的例子和源$ C ​​$ C来帮助你。

All of them have great examples and source code to help you out