0

I have an issue that I'm finding difficult to troubleshoot. I've created an app where I have the menu setup as such:

<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context="com.brainbox.dropnotelitealpha.app.MainActivity" >

  <item
    android:id="@+id/action_settings"
    android:title="@string/action_settings"
    android:orderInCategory="1"
    android:showAsAction="never"/>

    <item android:id="@+id/action_logout"
        android:title="Logout"
        android:orderInCategory="2"
        android:showAsAction="never" />
</menu>

I can access the items by pressing on the overflow icon in the ActionBar. The problem I have is that when I test the app on a Samsung S4, the overflow icon does not display. If I use an emulator, or any other device, the overflow displays as desired.

Does anyone have any ideas what may prevent the menu from displaying? Oh, it's only when menu items are set to android:showAsAction="never".

TIA

Noiroi
  • 27
  • 5

1 Answers1

0

Change your code to this and see if it's fixed:

<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context="com.brainbox.dropnotelitealpha.app.MainActivity" >

  <item
    android:id="@+id/action_settings"
    android:title="@string/action_settings"
    android:orderInCategory="1"
    android:showAsAction="ifRoom"/>

    <item android:id="@+id/action_logout"
        android:title="Logout"
        android:orderInCategory="2"
        android:showAsAction="ifRoom" />
</menu>
Nima Sakhtemani
  • 1,119
  • 2
  • 10
  • 21
  • While changing it such as you have listed "works", I don't think it addresses the problem. I had changed it to: ' ' I'm unsure why it displays as intended on other devices, but not on the Samsung. I'm hoping someone can shed some light as to what to look for to fix inconsistencies between devices. – Noiroi May 01 '14 at 17:46