Android Lollipop with custom Material theme logo doesn't act like DrawerToggle

HoloAdd this to the topic

 myActionBar.setDisplayHomeAsUpEnabled(true);

enter image description here

I see the application logo (in my case, mm_logosee below) in the upper left edge, and this logo acts as a cursor button

The Materiallogo is not displayed

enter image description here

but if i add

myActionBar.setDisplayShowHomeEnabled(true);

the application icon is displayed in the upper left edge (in my case, ic_launchersee below)

 <application
            android:allowBackup="true"
            android:icon="@drawable/ic_launcher"
            android:logo="@drawable/mm_logo"
            android:label="@string/app_name"
            android:theme="@style/Theme.GreenAppTheme"
            android:largeHeap="true">

If I add both of these lines

myActionBar.setDisplayShowHomeEnabled(true);
myActionBar.setDisplayUseLogoEnabled(true);

The logo is also displayed in the Material, but tends to fill the space highlighted with buttons with a too high left edge and does not act as a cursor button (this is a simple static image). Here is an example:

enter image description here

, mm_logo, , ActionBar?

. , , , , 3-

+4
1

v7 appcompat library.

​​ ActionBarDrawerToggle v7, .

, , .

: DrawerArrowToggle Android appcompat v7 21 library

+2

All Articles