0

次のコードを使用して、styles.xml で背景をグローバルに設定しようとしています。

スタイル.xml

<resources xmlns:android="http://schemas.android.com/apk/res/android">
  <style name="AppTheme" parent="android:Theme.Light" >      
    <item name="android:background">@drawable/background</item>      
  </style>
</resources>

AndroidManifest.xml ファイルにも追加しました

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

....
</application>

しかし、画像が表示されません。すべての描画可能なフォルダーに画像があります。

4

1 に答える 1

1

これを試して。

<style name="Theme" parent="@android:style/Theme">
    <item name="android:windowBackground">@drawable/background</item>
</style>
于 2012-11-02T11:50:09.617 に答える