At styles.xml first make a style for action bar with no title and with the logo like that
<style name="ActionBar.NoTitle" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="displayOptions">useLogo|showHome</item>
<item name="logo">@drawable/ic_logo</item>
</style>
Then create custome theme for your activity with new actionbar style
<!-- Create a style for MainActivity called AppTheme.Main that uses our custom ActionBar style -->
<style name="AppTheme.Main" parent="@style/AppTheme">
<item name="actionBarStyle">@style/ActionBar.NoTitle</item>
</style>
Then go to manifest file under the specified activity set theme to AppTheme.Main
android:theme="@style/AppTheme.Main"
I wish that help everyone