0

I just want to move the logo in the actionbar from the center to the left, i tried like this but did not work

<item name="logo">imgname</item>
<item name="android:gravity">left</item>

this is my actual code

<style name="MyActionBar"
parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="android:background">@drawable/emgtxtbg</item>
<item name="logo">@drawable/emgtxt</item>
<item name="displayOptions">useLogo|showHome</item>
<!-- Support library compatibility -->
<item name="background">@drawable/emgtxtbg</item>

  • Try refer the below link, http://stackoverflow.com/questions/14210454/how-to-set-two-custom-actionbar-button-in-left-and-right-in-android – Parth Bhayani Sep 06 '15 at 16:28

1 Answers1

1

Try this,

<ImageView
android:id="@+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:src="@drawable/adnace_search_i" />

Stay in touch with me if you find any problems.

Parth Bhayani
  • 1,894
  • 3
  • 17
  • 35