Android和蜂窝 - 如何与SDK 13的菜单图标,而无需一个"操作栏" [英] Android and Honeycomb - how to have a menu icon with SDK 13 without having an "action bar"

查看:123
本文介绍了Android和蜂窝 - 如何与SDK 13的菜单图标,而无需一个"操作栏"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想最大限度地利用屏幕的蜂窝应用程序。由于屏幕的底部已经套牢永远在线的项目,我想添加一个菜单按钮,在那边的空间,而不是牺牲更多的屏幕空间放置在顶部的操作栏。我怎样才能做到这一点的没有的降级到API 10还是少了? (虽然我不使用更多的空间,需要一个操作栏,我也不需要一个调整大小按钮,做我的应用程序一点好处都没有,并且不能被禁用的除了的通过去一个非常新的API版本)。

当然,人们可以做出某种有效地利用数百个像素,目前坐在黑暗和浪费在蜂窝屏幕的底部,后面的/ home /啄图标和ever- present时钟之间的?这将是又大的空间的可笑浪费创造有一个设置按钮,藏在角落里的目的,一个动作吧。

编辑:我看别人都问有点类似的问题,但在一般情况下,我们如何能够利用底部的,否则浪费的空间通过添加按钮,或你有什么那里?如果我必须从头开始我会创造我自己的菜单按钮,但我得到的IM pression,这个空间是不可用的(这将是pretty的荒诞如果是真的)。​​

编辑2:显然,这是真的:系统栏确实是不可侵犯的,大多存在于present未占用的空间给用户(尤其是在横向模式)。看起来像我可能要恢复到一个旧的SDK - 只要没有人使用的缩放图标应该没事

修改3:我很高兴地报告,与API 10菜单按钮又回来了,没用的变焦按钮消失了(使用Android的:在支持屏xlargeScreens =真实出现在此API工作!)

解决方案
  

我怎样才能做到这一点没有降级到API 10或更少?

您不能。

  

当然,人们可以做出某种有效地利用数百个像素,目前坐在黑暗和浪费在蜂窝屏幕的底部,后面的/ home /啄图标和ever- present时钟之间的?

只有当你正在修改的操作系统。你可以把一个通知那里,在右下方,而是专为警报,没有菜单。

  

这将是又大的空间的可笑浪费来创建具有单一的设置按钮,藏在角落里的目的,一个动作吧。

然后使用一个按钮,弹出设置。或者一些手势,或什么的。

  

如何我们可以利用底部的,否则浪费的空间通过添加按钮,或你有什么那里?

您不知道。即用于操作系统使用。正因为有空白并不意味着空间被浪费了 - 有一个过于复杂的控制区域并不一定是好事,因为那些UX和设计经验将指出

  

整个事情是有点可笑。

如果你的意思是你的态度,是的,它是有点雷人。

Android开发者对不遵守任何形式的约定或标准,导致应用程序,不看和工作相似,而一个名不虚传。一定程度上,这是Android的理念 - 谷歌并没有强制用户界面指南苹果的方式做。然而,谷歌确实提供了框架,引导开发商,促进应用程序之间的一致性方向。一些框架已经存在了相当长的一段时间(例如, preferenceScreen );其他都是新的(操作栏)。

您不必使用操作栏。很多不会的应用程序,如游戏。如果你不使用操作栏,但是,它是由你来提供整个用户体验,这样做的方式,用户会发现直观的,即使你在远离平台框架。

使用的是旧的目标API级别将越来越搞不清谁是习惯了,是最新的应用程序的用户。现在,肯定有很多未针对API级别11或更高,因此具有系统栏菜单按钮的应用程序。这将在明年改变。最终,用户的preponderance将不知道如何进入你的菜单,因为他们不会注意到,出现在系统栏还是不知道它做什么这看起来很有趣的图标。其中有些用户会问,为什么你没有像大多数的其它应用程序的右上角的菜单。

如果您不希望一个操作栏,你可以滚你自己的右上边角菜单中,使用的ImageButton 的PopupMenu 为例。也就是说,至少,会让你符合那些使用操作栏的其他应用程序,把菜单,用户会希望看到它。或做其他事与你的用户界面的其他部分为菜单启示更加一体化。不要依赖于长期的系统栏中的遗赠扶养MENU按钮 - 而应该无限期地支持,用户将被调整,或许比你更快

I would like to maximize use of the screen for a Honeycomb app. Since the bottom of the screen is already stuck with "always-on" items, I'd like to add a menu button down there in that space rather than sacrificing more screen space putting an "action bar" across the top. How can I accomplish this without downgrading to API 10 or less? (As much as I don't need an action bar using up more space, I also don't need a resize button that does my app no good at all and can't be disabled except by going to a very recent API version.)

Surely one can make some kind of effective use of hundreds of pixels that currently sit dark and wasted at the bottom of a Honeycomb screen, between the back/home/thingy icons and that ever-present clock? It'll be a ridiculous waste of yet more space to create an action bar for the purpose of having a single settings button tucked in the corner.

Edit: I see others have asked somewhat similar questions but in general, how can we make use of the otherwise wasted space at the bottom by adding buttons or what have you down there? If I have to create my own menu button from scratch I will, but I get the impression that this space is unusable (which would be pretty absurd if true).

Edit 2: Apparently it's true: The "system bar" is indeed inviolable and mostly exists to present unoccupied space to the user (particularly in landscape mode). Looks like I may have to revert back to an older SDK - as long as nobody uses the zoom icon it should be fine.

Edit 3: I'm pleased to report that with API 10 the menu button is back AND the useless zoom button is GONE (using android:xlargeScreens="true" in the supports-screens appears to work in this API!)

解决方案

How can I accomplish this without downgrading to API 10 or less?

You can't.

Surely one can make some kind of effective use of hundreds of pixels that currently sit dark and wasted at the bottom of a Honeycomb screen, between the back/home/thingy icons and that ever-present clock?

Only if you are modifying the operating system. You can put a Notification down there, in the lower right, but that is designed for alerts, not menus.

It'll be a ridiculous waste of yet more space to create an action bar for the purpose of having a single settings button tucked in the corner.

Then use a button to bring up your settings. Or some gesture, or whatever.

how can we make use of the otherwise wasted space at the bottom by adding buttons or what have you down there?

You don't. That is for the OS to use. Just because there is whitespace does not mean that space is "wasted" -- having an overly-complicated control area is not necessarily a good thing, as those with UX and design experience will point out.

The whole thing is kinda ridiculous

If you mean your attitude, yes, it is "kinda ridiculous".

Android developers have a well-deserved reputation for not adhering to any sort of conventions or standards, resulting in applications that don't look and work like one another. Partly, this is Android philosophy -- Google doesn't enforce human interface guidelines the way Apple does. However, Google does provide frameworks to steer developers in a direction that promotes consistency between apps. Some of these frameworks have existed for quite some time (e.g., PreferenceScreen); others are new (action bar).

You do not have to use the action bar. Lots of applications won't, such as games. If you are not using the action bar, though, it is up to you to provide the entire user experience, and to do so in a way that users will find intuitive even though you are eschewing platform frameworks.

Using an old target API level will increasingly confuse users who are used to applications that are up to date. Right now, there are certainly plenty of applications that are not targeting API Level 11 or higher and therefore have the system bar MENU button. That will change over the next year. Eventually, a preponderance of users will have no idea how to access your menu, because they will not notice this funny-looking icon that appears in the system bar or not know what it does. Some of these users will wonder why you don't have a menu in the upper-right corner like most of their other applications.

If you don't want an action bar, you can roll your own upper-right-corner menu, using an ImageButton and PopupMenu, for example. That, at least, will keep you consistent with other apps that do use an action bar, putting the menu where users will expect to see it. Or do something else more integrated with the rest of your UI as a menu affordance. Don't rely on the legacy-support MENU button in the system bar for long -- while it should be supported indefinitely, users will be adapting faster than perhaps you are.

这篇关于Android和蜂窝 - 如何与SDK 13的菜单图标,而无需一个"操作栏"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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