0

I want to set DrawerArrowToogle background color, when it is in pressed state. I found the styling for the Drawer, but it has no "background" attribute.

<style name="Base.Widget.AppCompat.DrawerArrowToggle" parent="">
   <item name="color">?android:attr/textColorSecondary</item>
   <item name="thickness">2dp</item>
   <item name="barSize">18dp</item>
   <item name="gapBetweenBars">3dp</item>
   <item name="topBottomBarArrowSize">11.31dp</item>
   <item name="middleBarArrowSize">16dp</item>
   <item name="drawableSize">24dp</item>
   <item name="spinBars">true</item>
</style>

I also tried to set android:selectableItemBackground, but it didn't help.

So, how to set background for DrawerArrowToogle (from latest support lib)?

enter image description here

Holoceo
  • 168
  • 2
  • 7

2 Answers2

0

Take a look at this post.

<style name="MyTheme" parent="Theme.AppCompat">
   <item name="drawerArrowStyle">@style/MyDrawerArrowToggle</item>
</style>

<style name="MyDrawerArrowToggle" parent="Widget.AppCompat.DrawerArrowToggle">
  <item name="color">@color/your_color</item>
</style>
Community
  • 1
  • 1
Bart de Ruijter
  • 917
  • 10
  • 21
0

I shouldn't add "android" to selectableItemBackground because of v7. So it should look like: <item name="selectableItemBackground">@drawable/toolbar_selectable_background</item>

Holoceo
  • 168
  • 2
  • 7