如何创建Gmail等Android的底部菜单菜单、Gmail、Android

2023-09-13 01:15:26 作者:指尖滑落的泪

我不太清楚Gmail使用Android中有什么样的布局。 我想他们使用浮动的ViewGroup

I am not quite sure what kind of layout Gmail is using in Android. I suppose they use a floating ViewGroup.

但对我真的很需要有人在顶部和底部的菜单点我如何使这一点。

But for the menu on the top and bottom I really need somebody point me how to make that.

推荐答案

我建议你使用大侦探动作条:

I suggest you to use the Sherlock ActionBar:

http://actionbarsherlock.com/

这可以让你轻松地开发与从2.x和高达每一个版本的Andr​​oid的操作栏中的应用程序。

This allows you to easily develop an application with an action bar for every version of Android from 2.x and up.

在样本应用程序,你可以找到code来实现你在找什么在拆分行动项目。我们的想法是,你从菜单中像往常一样加行动,但书面方式在你的清单活动下面一行:

In the sample app you can find the code to achieve what you are looking for under "Split Action Items". The idea is that you add actions from the menu as usual, but writting the following line in your manifest activity:

android:uiOptions="splitActionBarWhenNarrow"