0

I'm really new to android development - I've been creating an action bar and its functioning, however it is going straight into my overflow although there is space for it to display?

Any help would be much appreciated!

1
  • 1
    android:showAsAction="always" Commented Sep 26, 2014 at 21:05

1 Answer 1

1

For API 11 and above you can use android:showAsAction tag for each item. See http://developer.android.com/guide/topics/resources/menu-resource.html

Use android:showAsAction="always" or android:showAsAction="ifRoom" etc for each item as per your need.

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

5 Comments

sorry its not letting me post my code but I have done so and it just comes up in my overflow with all the items i have added
So it helped achieve what you want?
unfortunately not, <item android:id="@+id/action_search" android:icon="@drawable/ic_action_search" android:title="@string/action_search" android:showAsAction="always" /> - that is what i have per item but they are automatically being placed in the overflow on the emmulator with text 'Search' etc.
If you have lots of items then all might not be able to fit on the top bar. What happens when you do ifRoom?
What API version are you using?

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.