[英]Android L Theme.Material not being recognized
I'm trying to change my app's status and navigation bar colors and so far nothing I've tried has worked. 我正在尝试更改应用程序的状态和导航栏颜色,到目前为止,我尝试过的所有操作均无效。 My project is targeted to L. 我的项目针对L。
Here is my styles.xml in values-v21 folder. 这是我在values-v21文件夹中的styles.xml。
<style name="CalcTheme" parent="android:Theme.Material">
<item name="android:colorPrimaryDark">@color/primary_dark</item>
<item name="android:colorPrimary">@color/primary</item>
<item name="android:colorAccent">@color/accent</item>
<item name="android:statusBarColor">@color/primary_dark</item>
<item name="android:navigationBarColor">@color/primary_dark</item>
</style>
The problem is none of these changes are working when I run the project on my Nexus 5 (running L) 问题是,当我在Nexus 5上运行项目(运行L)时,这些更改均不起作用
改成 :
<style name="CalcTheme" parent="@android:style/Theme.Material">
as of oct 2014 i am able to see the changes in the emulator but not inside the layout preview. 从2014年10月开始,我可以在模拟器中看到更改,但在布局预览中看不到。 just for reference i was refering to this tutorial https://developer.android.com/training/material/theme.html 仅供参考,我指的是本教程https://developer.android.com/training/material/theme.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.