As stated here , I should be able to change the color of my ActionBar if I define a foreground color in my style.
<style name="AppTheme" parent="android:Theme.Material"> <item name="android:colorPrimary">#ff0000</item> </style>
However, the color is still gray by default. Did I miss something?
There is a values ββfolder-21 ... I made changes to the values ββfolder and, of course, it was not used.
As the docs say, you should use @android:style/Theme.Material as the parent theme, not android:Theme.Material .
@android:style/Theme.Material
android:Theme.Material
Then you can use <item name="android:colorPrimary">#ff0000</item> , just like you.
<item name="android:colorPrimary">#ff0000</item>
You can simply use this as the parent theme in the res / values-v21 folder :
<style name="Theme.Base" parent="android:Theme.Material" />
Then refer to this stylesheet as follows:
<style name="Theme.Sample" parent="Theme.Base" />
Source: https://habr.com/ru/post/971458/More articles:How to declare a familiar custom literal operator in a template class? - c ++problem with changing request headers in Firefox using AngularJS - content-typeExpress.js with websockets - javascriptInclude a specific fragment from one markdown document in another document - rAndroid: changing tab text color in FragmentActivity - androidangular.then () not recognized - angularjsMockito throwing UnfinishedVerificationException (possibly related to calling a native method) - javahttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/971461/issues-with-testing-springs-declarative-caching-support-on-a-spring-data-repository&usg=ALkJrhg2pVWwvEQfTF3WxJEiatW8ZM63GwMeteor.js: lib folder not loaded first - javascripthttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/971463/how-to-test-springs-declarative-caching-support-on-spring-data-repositories&usg=ALkJrhiNk0ZSm95iggN-c9EAi4Lai5K0-AAll Articles