I'm having trouble making ActionBarToggleButton having custom selector. I got app that works for mobile and tablet devices, and now I have to make it usable for TV devices.
To do that I have to add some custom focus selector, that is more visible then default one.
App uses NavigationView for drawer and has toggle button in action bar that opens it. Also there are other items in action bar.
I have managed to change selectors for all action bar items except toggle button via:
<item name="android:actionBarItemBackground">@drawable/selectable_selector</item>
Is there a way to customize ActionToggleButton
.
I dont need to change arrow drawable, but only color of the default selector.
Thanks
In API 21 and more you only need to write this item in
style.xml
, in your Toolbar theme:But in lower APIs, First you should write this style in your
styles.xml
:then add this items to your toolbar theme:
Example:
(Sorry for my weak English)