Action bar overflow not displayed

前端 未结 2 1442
醉话见心
醉话见心 2021-02-06 12:30

I\'m setting up an action bar with Sherlock with 3 items/icons. Running on a ICS emulator, I only can see 2 icons. And moreover: NO overflow menu (those 3 dots-icon)! I only get

2条回答
  •  梦谈多话
    2021-02-06 13:08

    Do I have to force the overflow icon

    No.

    Your emulator is set up, by default, to emulate a device that has an off-screen MENU key, like the Nexus S. Such devices will not have an on-screen overflow menu button -- users will use the MENU key to access the overflow. Many of those devices, like the Nexus S, will be ones upgraded from Android 2.x, where the user will already be used to pressing the MENU key to get what used to be the options menu and now is the overflow menu.

    You can switch your emulator to emulate a device without an off-screen MENU key. In your AVD Manager, for an AVD, add the "Hardware Back/Home keys" property (which, despite the name, also has the MENU key) and set it to be true or false as you wish.

提交回复
热议问题