2018年2月5日 星期一

Change the color of toolbar overflow icon

Reference:

Method 1:
https://snow.dog/blog/how-to-dynamicaly-change-android-toolbar-icons-color/
https://stackoverflow.com/questions/43537958/change-toolbar-overflow-icon-color/43539097
https://futurestud.io/tutorials/android-quick-tips-8-how-to-dynamically-tint-actionbar-menu-icons

Method 2:
https://www.murrayc.com/permalink/2014/10/28/android-changing-the-toolbars-text-color-and-overflow-icon-color/
https://stackoverflow.com/questions/27995461/appcompat-toolbar-change-overflow-icon-color-in-actionmode


Code snippet:

Method 1:
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
    <item name="android:textColorPrimary">@color/action_bar_text_color</item>
    <!-- change the overflow icon color (three vertical dots) -->    <item name="android:tint">@color/action_bar_overflow_icon_color</item>
    <item name="android:textSize">20sp</item>
    <item name="android:textStyle">bold</item>
    <item name="android:fontFamily">Roboto Medium</item>
</style>

沒有留言: