如何创建Gmail等Android的底部菜单 [英] How to create bottom menu like gmail android

查看:106
本文介绍了如何创建Gmail等Android的底部菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不太清楚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"

这篇关于如何创建Gmail等Android的底部菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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