自己的Android主题在Android中不起作用

时间:2014-03-04 21:10:37

标签: android styles themes

我在创建自己的主题时遇到问题。在Eclipse中,项目看起来很好,当我用布局打开我的.xml时,它在图形布局预览中看起来应该是这样。我已尝试使用Android的多个设备,也使用虚拟设备。效果是一样的,应用程序看起来像使用默认主题。

我在styles.xml中定义了自己的布局:

<?xml version="1.0" encoding="utf-8"?>
  <resources>
    <style name="AppBaseTheme" parent="@android:style/Theme.NoTitleBar" />
    <style name="OwnTheme1" parent="AppBaseTheme">
      <item name="android:windowNoTitle">true</item>
      <item name="android:windowBackground">@color/white</item>
    </style>
</resources>

在我的AndroidManifest.xml文件中,它如下所示:

<application
        android:label="@string/app_name"
        android:icon="@drawable/ic_launcher"
        android:theme="@style/OwnTheme1">

我还需要其他任何东西来使其有效吗?我在最新的Android KitKat版本上运行它。

0 个答案:

没有答案
相关问题