I have the following problem:

I compile my application for Android 4.4.2 using actionbarsherlock. When run it on the android 4.4.2 emulator it looks like this:

Android 4.4.2

When I run this application on my phone with Android 4.0.4 I saw this:

Android 4.0.4

The menu at the top was gone. How can I fix this?

Сompile this http://wptrafficanalyzer.in/blog/adding-action-items-and-overflow-menu-items-to-action-bar-in-android/

有帮助吗?

解决方案

If your device or emulator has a physical menu button, the overflow items from action bar are behind it. The menu button is added to actionbar if there is no physical menu button.

Question How to force action bar overflow icon to show has an answer on how to put the overflow items to actionbar menu instead of physical menu button.

其他提示

Have you ever heard of support v7 appcompat ? Use it's ActionBar.

Seems like your phone has hardware menu button.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top