-1

I've one android with with minimun sdk 16
The app itself is working fine and i'm adjusting last visual details
I noticed that my action bar is not displaying properly on API 16

enter image description here

the left side is screenshot on api 16 the right side is screenshot on api 27

how can i make api 16 look like 27

Rafael Lima
  • 3,079
  • 3
  • 41
  • 105

1 Answers1

2

This is the desired behaviour according to new design guidelines. You are using appCompat so it is supposed to happen. see Menus - Component

Update: If you still don't want the overflow menu to overlap action bar, you will have to override overflow menu style from appCompat. This might work

<resources>
    <style name="AppBaseTheme" parent="Theme.AppCompat.Light" />

    <style name="AppTheme" parent="AppBaseTheme">
        <item name="actionOverflowMenuStyle">@style/OverflowMenu</item>
    </style>

    <style name="OverflowMenu" parent="Widget.AppCompat.PopupMenu.Overflow">
        <item name="overlapAnchor">false</item>
   <item name="android:dropDownVerticalOffset">-4.0dip</item>
  <!-- Required for Lollipop. -->
   <item name="android:overlapAnchor">false</item>
   <item name="android:dropDownVerticalOffset">4.0dip</item>
    </style>

</resources>  

For Lollipop style must be in values-v21.

About the margin on the right I looked at many site only solution I could find link .
<item name="android:dropDownHorizontalOffset">-16dp</item> try changing the value to set it

Hope it helps

Kevin Kurien
  • 812
  • 6
  • 14