1

I want to hide overflow button (in action bar).

Can someone help me do this?

I am creating action bar in my code using support library. Then I am creating overflow icon in action bar in my code. When I run my app its show overflow icon but when I run my device its invisible. From some links I found reason behind this is presence of menu button on my device. Is it true? And how to show overflow icon on each device?

Code:

<menu xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:yourapp="http://schemas.android.com/apk/res-auto" >
    <!-- Search, should appear as action button -->
     <item
        android:id="@+id/menu_1"
        android:orderInCategory="1"
        yourapp:showAsAction="never"
        android:title="@string/share"/>
    <item
        android:id="@+id/menu_2"
        android:orderInCategory="2"
        yourapp:showAsAction="never"
        android:title="@string/contact"/>
    <item
        android:id="@+id/menu_3"
        android:orderInCategory="3"
        yourapp:showAsAction="never"
        android:title="@string/contact1"/>

</menu>
Bernhard Barker
  • 54,589
  • 14
  • 104
  • 138
  • "ignore below code. it is not mine" - I don't get it, why are you posting code you want us to ignore? If it's not applicable to the question, please remove it. – Bernhard Barker Feb 27 '14 at 07:06
  • http://stackoverflow.com/questions/9739498/android-action-bar-not-showing-overflow – keshav Feb 27 '14 at 11:25

1 Answers1

0

In Android versions under 4.4, the overflow button hides if the device has a menu button. That's how it is supposed to work.

The user will be confused if there are two buttons that have the exact same function.

Mark Buikema
  • 2,483
  • 30
  • 53