Android Material Design: Failed to find style 'toolbarStyle' in current theme

后端 未结 2 1758
执笔经年
执笔经年 2021-02-02 11:55

I am trying to use the toolbar widget in android 21 with a custom style but I can\'t get rid off this error : Failed to find style \'toolbarStyle\' in current theme

相关标签:
2条回答
  • 2021-02-02 12:29

    I had the same problem event though my xml was correct. The solution was to: Set AppCompat theme in the Theme Select Checkbox, see pic. enter image description here

    0 讨论(0)
  • 2021-02-02 12:31

    You can use the style Widget.AppCompat.Toolbar.

    <!-- Toolbar styles -->
        <item name="toolbarStyle">@style/Widget.AppCompat.Toolbar</item>
    
    0 讨论(0)
提交回复
热议问题