Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在为 ICS 开发应用程序时 - 操作栏看起来会有所不同,具体取决于设备上是否存在物理菜单按钮。
例如,如果没有,则在操作栏中显示一个虚拟按钮。
是否可以通过在模拟器中以某种方式禁用它来模拟没有菜单按钮的设备?
有一个选项“硬件返回/主页键”。创建虚拟设备时指定选项并将其设置为“否”。
使用更新的 SDK 工具(本答案为 R22),AVD 管理器编辑器不再在 UI 上公开这些选项。您必须手动编辑 AVD 的config.ini并将以下键从
hw.mainKeys=yes
至
hw.mainKeys=no
打开AVD Manager, ClickShow on Disk option, Edit theconfig.ini file from the opened directory, findhw.mainKeys config and set it toyes`
AVD Manager, Click
option, Edit the
file from the opened directory, find
config and set it to
hw.mainKeys = yes
保存文件并重新启动 AVD。
有关更多详细信息,请参阅下面的屏幕截图
正如@Yenchi 所说,勾选“hw.mainKeys”。虚拟设备看起来像第二张图片。