I want to use the logo instead of homeAsUp on the actionBar to open drawerLayout, I managed to do this, but it seems that the homeAsUp space is left, so it looks like the logo has leftMargin.
This is what I did:
style.xml
<item name="android:logo">@drawable/logo_file</item> <item name="android:displayOptions">showHome|useLogo</item>
logo_file.xml
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/mylogo" android:left="-10dp" </layer-list>
activity
getActionBar().setHomeButtonEnabled(true); getActionBar().setDisplayUseLogoEnabled(true);
Running android:left="-10dp" does not solve the problem, it only removes 10dp to the left of the logo.
So please help me move the logo.
source share