AppCompat - 使用v14文件夹性能的样式

时间:2014-11-15 20:15:39

标签: android performance android-appcompat

这两种实现AppCompat样式的方法是否存在性能差异?一种方法比另一种更好吗?

值/ styles.xml

<style name="ActionBar.Solid.Sunshine" parent="Widget.AppCompat.Light.ActionBar.Solid.Inverse">
    <item name="android:background">@color/sunshine_blue_500</item>
    <item name="background">@color/sunshine_blue_500</item>
</style>

--------- VS --------------------

值-V14 / styles.xml

<style name="ActionBar.Solid.Sunshine" parent="Widget.AppCompat.Light.ActionBar.Solid.Inverse">
    <item name="android:background">@color/sunshine_blue_500</item>
</style>

值/ styles.xml

<style name="ActionBar.Solid.Sunshine" parent="Widget.AppCompat.Light.ActionBar.Solid.Inverse">
    <item name="background">@color/sunshine_blue_500</item>
</style>

1 个答案:

答案 0 :(得分:0)

v-14双文件夹方法更好,或者如果值/ styles.xml包含min API级别无法访问的命名空间,则会出现错误