Android 主题背景

Android 主题背景,android,styles,themes,background-color,Android,Styles,Themes,Background Color,我需要为我的应用程序中的每个活动设置背景色。我更愿意将其设置为全局。因此,我更改了设置为应用程序主题的样式 <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar"> <item name="android:backgr

我需要为我的应用程序中的每个活动设置背景色。我更愿意将其设置为全局。因此,我更改了设置为应用程序主题的样式

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

@颜色/应用背景
问题是,现在所有没有指定背景的ImageView和TextView都会获得应用程序背景,而不是父布局的背景

<RelativeLayout 
    android:id="@+id/mmc_rl"
    android:layout_width="match_parent"
    android:layout_height="@dimen/mm_central_height"
    android:background="@color/main_menu_central_bg"> 

    <ImageView
        android:id="@+id/mmc_iv_goto"
        android:layout_width="@dimen/mm_central_height"
        android:layout_height="@dimen/mm_central_height"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:src="@drawable/button_goto_big3"  />

</RelativeLayout>


ImageView的背景为
app\u bg
,而不是预期的
main\u menu\u central\u bg
。如何解决此问题?

在ImageView xml中包括这一行:

android:background="@android:color/transparent"

在ImageView xml上包括此行:

android:background="@android:color/transparent"

好的,谢谢,正确的拼写是android:background=“@android:color/transparent”,没有“colors”的“s”,谢谢。编辑。你知道的。我是用心输入的,这些东西都会发生。好的,谢谢,正确的拼写是android:background=“@android:color/transparent”,没有“colors”的“s”,谢谢。编辑。你知道的。我是用心打字的,这些事情都会发生。