2

I have to design an action bar which has two action items and a center aligned title, with three action items in overflow menu. On Samsung Galaxy S3, I have implemented it, but on Nexus4, the overflow menu comes on top and pushes action items to left. I want either to completely remove overflow menu from top or to squeeze it to minimum width. Can anybody tell me how can I do that? Thanx in advance.

1 Answer 1

5

I was able to fix this issue earlier, now am posting this answer so that it may help anyone else. To squeeze the overflow menu edit your theme like this.

 <style name="AppTheme" parent="AppBaseTheme">
   <item name="android:actionOverflowButtonStyle">@style/overFlowButtonStyle</item>
 </style>
 <style name="ActionBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar"> 
  <item name="android:actionOverflowButtonStyle">@style/overFlowButtonStyle</item>
 </style>
 <style name="overFlowButtonStyle" parent="@android:Widget.ActionButton.Overflow">
  <item name="android:minWidth">5dip</item>
  <item name="android:maxWidth">5dip</item>
  <item name="android:padding">0dip</item>
  <item name="android:src">@drawable/overflow_menu</item>
  </style>
Sign up to request clarification or add additional context in comments.

Comments

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.