安卓:自定义应用程序的菜单(如背景色) [英] Android: customize application's menu (e.g background color)

查看:154
本文介绍了安卓:自定义应用程序的菜单(如背景色)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是什么方式(如果有一种方法)来定制菜单(一个通过电话的菜单按钮触发)。我在两件事情特别感兴趣:

What is the way (if there is a way) to customize the menu (the one triggered by the MENU button of the phone). I'm especially interested in two things:

  • 改变从标准的浅灰色的背景颜色为深灰色
  • 如何菜单项对齐。我有4个项目,它们会自动校准2x2的,但我想preFER让他们都在同一个线路(1×4)

推荐答案

不能与内置菜单的框架。

Not with the built-in menu framework.

欢迎您拦截MENU按钮(通过的onkeydown()或东西),并呈现你想要什么,但请记住,用户会希望它看起来像菜单的其余部分做他们的设备上。

You are welcome to intercept the MENU button (via onKeyDown() or something) and render what you want, but bear in mind that users will be expecting it to look like the rest of the menus do on their device.

这篇关于安卓:自定义应用程序的菜单(如背景色)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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