1

For some reason my search icon is positioned a little bit higher than the settings icon. How do I lower the position of the search icon to match the settings icon in actionBar. Here's what I mean:

enter image description here

Here's my code for search icon, I got this icon from the Android Studio Image Asset Clip Art.

<item



    android:id="@+id/menuSearch"
    android:title="@string/search"
    android:hint="@string/search"
    android:icon="@drawable/ic_search_black_24dp"
    app:showAsAction="ifRoom|collapseActionView"
    app:actionViewClass="android.support.v7.widget.SearchView"

     />

How do I lower the search icon ?

iBEK
  • 622
  • 2
  • 8
  • 27

1 Answers1

0

If the concern is only lowering it down, you can try:

  • Adding some top margin
  • Negative bottom margin

PS: we should do this only if the image has an included bottom padding, otherwise it may not appear correctly on other devices if the reason is unknown. (Maybe include some more top-level hierarchy code as well)

premkamal
  • 133
  • 1
  • 7