Android 支持自定义样式的预列印设备

Android 支持自定义样式的预列印设备,android,styles,Android,Styles,我正在用Android做我的自定义风格,我想知道是否有可能在Prerollipop设备中支持这种风格 现在,我在values文件夹中有了这个.xml,我使用的是AndroidStudio 有什么建议吗 谢谢 <resources xmlns:tools="http://schemas.android.com/tools"> <style name="GradiantTheme" parent="android:Theme.DeviceDefault.Light.NoA

我正在用Android做我的自定义风格,我想知道是否有可能在Prerollipop设备中支持这种风格

现在,我在values文件夹中有了这个.xml,我使用的是AndroidStudio

有什么建议吗

谢谢

<resources xmlns:tools="http://schemas.android.com/tools">

    <style name="GradiantTheme" parent="android:Theme.DeviceDefault.Light.NoActionBar">

        <!-- App background color -->
        <item name="android:windowBackground">@color/theme_background</item>

        <!--Transparent status bar-->
        <item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>


        <!--   texts -->
        <item name="android:textColor" tools:targetApi="lollipop">@color/gradiant</item>


        <!--   theme UI controls like checkboxes and text fields -->
        <item name="android:colorAccent" tools:targetApi="lollipop">@color/gradiant</item>


    </style>




</resources>

@颜色/主题背景
符合事实的
@颜色/梯度
@颜色/梯度

您的默认值文件夹将仅适用于棒棒糖前的设备。如果您创建了values-v21文件夹,那么其中的样式将专门用于支持棒棒糖版本的设备。例如,您可以将您的棒棒糖转换效果放在values-v21文件夹的样式xml中,因为它将仅由棒棒糖支持。 如果只想更改棒棒糖前设备的样式,那么只需在默认值文件夹中的样式xml中进行这些更改。
希望以上描述有帮助。

对于旧版本,请检查项目中的两个文件夹,如下所示: 值-v11:


值-v14:

<resources>

    <!--
        Base application theme for API 14+. This theme completely replaces
        AppBaseTheme from BOTH res/values/styles.xml and
        res/values-v11/styles.xml on API 14+ devices.
    -->
    <style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- API 14 theme customizations can go here. -->
    </style>

</resources>

如果你投了反对票,你必须解释一下原因?我写的描述是绝对正确的,因为我自己实现了这个!!
<resources>

    <!--
        Base application theme for API 14+. This theme completely replaces
        AppBaseTheme from BOTH res/values/styles.xml and
        res/values-v11/styles.xml on API 14+ devices.
    -->
    <style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- API 14 theme customizations can go here. -->
    </style>

</resources>