Note that there are some explanatory texts on larger screens.

plurals
  1. POAction Bar padding differences between devices
    text
    copied!<p>I have an action bar defined in the following manner:</p> <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;item android:id="@+id/menu_refresh" android:icon="@drawable/menu_refresh" android:showAsAction="always"/&gt; &lt;item android:id="@+id/menu_shelves" android:icon="@drawable/menu_shelves" android:showAsAction="always"/&gt; ... more items ... &lt;/menu&gt; </code></pre> <p>This is the main activity layout:</p> <pre><code>&lt;com.totalboox.android.views.BorderedLinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:padding="6dp" &gt; &lt;View android:layout_width="match_parent" android:layout_height="?android:attr/actionBarSize" android:background="@color/actionbar_back_color" /&gt; &lt;FrameLayout android:id="@+id/contentView" android:layout_width="match_parent" android:layout_height="match_parent" /&gt; &lt;/com.totalboox.android.views.BorderedLinearLayout&gt; </code></pre> <p>This is how it displays on Samsung Tab with os 3.2</p> <p><img src="https://i.stack.imgur.com/8POwe.png" alt="enter image description here"></p> <p>And this is how it displays on Motorola Zoom with os 4:</p> <p><img src="https://i.stack.imgur.com/FDahg.png" alt="enter image description here"></p> <p>As you can see, it displays correctly on the Samsung tab, but it's on the top instead of being in the center for the Motorola Zoom. Is there anyway to make sure the icons are centered on both devices?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload