0

Menu Layout

<menu xmlns:myapp="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android" >

<!-- Search Widget -->
<item
    android:id="@+id/action_search"
    android:icon="@drawable/action_ic_search"
    android:title="@string/action_settings"
    android:orderInCategory="1"
    myapp:showAsAction="always"/>

<!-- Location Found -->

<item
    android:id="@+id/action_location_found"
    android:icon="@drawable/action_ic_location_found"
    android:title="@string/action_settings"
    android:orderInCategory="2"
    myapp:showAsAction="always"/>

<item
    android:id="@+id/action_location"
    android:icon="@drawable/action_ic_place"
    android:title="@string/action_settings"
    android:orderInCategory="3"
    myapp:showAsAction="always"/>

I create Actionbar in Android API 10 and I use android support v7 appcompat. I see in some tutorial that when we set android:showAsAction="never" we will get the overflow menu. However when I run my app only 2 item appear and the overflow menu not appear. What should I do to show the overflow menu.

Thanks for your help.

4
  • You should check this post, it may help stackoverflow.com/questions/18510337/… Commented Jul 10, 2014 at 10:47
  • Thank you but it doesn't work for me Commented Jul 10, 2014 at 10:59
  • Did you try changing 'showAsAction's from always to ifRoom? I have not that much experience with appcompat, just guessing. Setting always forces app to show item and it can be overlap with other items as a result. Commented Jul 10, 2014 at 11:06
  • Yes. I did that way but it didn't work. Commented Jul 11, 2014 at 1:03

1 Answer 1

2

What Device are you using? devices with a Menu Button e.g. Samsung Galaxy S4 hide the overflow Button in the Actionbar, and it is available through the Hardware Menu Button

Sign up to request clarification or add additional context in comments.

4 Comments

I'm using the Samsung Galaxy S2. Could you recommend me some another device which show the Overflow menu
If you have a question to OP, you should comment. Also this is not an actual answer, it's just an assumption.
@PhanVănLinh You can use avd to check if issue comes from device.
I used to check with Nexus S, Nexus One, Samsung Galaxy S2 and it didn't show the overflow menu. I think my problem doesn't come from the avd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.