我注意到背景颜色为@android:color/background_holo_light
,这是一种非常浅的灰色。我想要覆盖它。我希望背景颜色是完全白色的。 100%纯粹没有废话白......我似乎无法得到它。
我尝试用#FFFFFF
创建自己的背景样式,我尝试更改布局背景颜色,没有任何效果。
答案 0 :(得分:1)
以下是我的主题XML的内容,在我之前的回答的评论中发帖太长了。 @ style / AppTheme使用父标记
继承Holo.Light<resources>
<color name="red">#ffff0000</color>
<color name="green">#ff00ff00</color>
<color name="color_lightgreen">#ffd7ffb2</color>
<color name="color_lightyellow">#ffffffc1</color>
<color name="color_lightgrey">#e6e6e6e6</color>
<!-- EARTH TONES -->
<color name="color_earth_white">#FFFFFF</color>
<color name="color_earth_yellow">#EFC84A</color>
<color name="color_earth_orange">#E27C3E</color>
<color name="color_earth_black">#000000</color>
<color name="color_earth_teal">#334D5C</color>
<color name="color_earth_dark">#102A39</color>
<color name="color_earth_light">#6A808C</color>
<color name="color_earth_purple">#333574</color>
<color name="color_earth_rose">#7C4554</color>
<color name="color_earth_green">#597943</color>
<!-- PARTY TIME -->
<color name="color_party_green">#C6F269</color>
<color name="color_party_green_light">#ECF7D6</color>
<color name="color_party_orange">#FFB16E</color>
<color name="color_party_orange_light">#ffcda2</color>
<color name="color_party_dark">#7461C1</color>
<color name="color_party_dark_light">#c2bdd6</color>
<color name="color_party_complement">#D65DA4</color>
<color name="color_party_complement_light">#e4c6d8</color>
<color name="color_bg_sent">@color/color_party_orange</color>
<color name="color_bg_recv">@color/color_party_orange_light</color>
<color name="color_error">@color/color_earth_yellow</color>
<!-- /////////////////// END OF COLORS //////////////////////////////// -->
<style name="Theme.Plum" parent="@style/myAppTheme">
<item name="android:windowBackground">@color/color_earth_teal</item>
<item name="android:buttonStyle">@style/ButtonLight.Plum</item>
<item name="android:actionBarStyle">@style/ActionBar.Plum</item>
<item name="android:editTextStyle">@style/EditTextLight.Plum</item>
<item name="android:textViewStyle">@style/TextViewLight.Plum</item>
<item name="android:listViewStyle">@style/ListViewLight.Plum</item>
<item name="android:progressBarStyleHorizontal">@style/ProgressBar.Plum</item>
<item name="android:itemTextAppearance">@style/ContextMenuItem.Plum</item>
<item name="android:alertDialogTheme">@style/AlertDialog.Plum</item>
<item name="android:textColorPrimary">@color/color_earth_teal</item> <!-- Title Text -->
<item name="android:textColorSecondary">@color/color_earth_orange</item> <!-- Set Value -->
<item name="android:textColorTertiary">@color/color_earth_yellow</item> <!-- Group Text -->
</style>
<style name="ContextMenuItem.Plum" parent="@android:style/TextAppearance.Widget.IconMenu.Item">
<item name="android:textColor">@color/color_earth_dark</item>
</style>
<style name="ActionBar.Plum" parent="@android:style/Widget.Holo.Light.ActionBar">
<item name="android:background">@color/color_earth_yellow</item>
</style>
<style name="EditTextLight.Plum" parent="android:Widget.EditText">
<item name="android:textColor">@color/color_earth_white</item>
<item name="android:textColorHighlight">@color/color_earth_orange</item>
</style>
<style name="TextViewLight.Plum" parent="android:Widget.TextView">
<item name="android:textColor">@color/color_earth_white</item>
</style>
<style name="TextViewLight.Plum.Invert" parent="@style/TextViewLight.Plum">
<item name="android:textColor">@color/color_earth_teal</item>
</style>
<style name="AlertDialog.Plum" parent="@android:style/Theme.Holo.Dialog">
<item name="android:textColor">@color/color_earth_orange</item>
<item name="android:background">@null</item>
</style>
<style name="ProgressBar.Plum" parent="android:Widget.Holo.Light.ProgressBar.Horizontal">
<item name="android:progressDrawable">@drawable/plumyellow_progress_horizontal_holo_light</item>
<item name="android:indeterminateDrawable">@drawable/plumyellow_progress_indeterminate_horizontal_holo_light</item>
</style>
<style name="ListViewLight.Plum" parent="android:style/Widget.ListView">
<item name="android:background">@color/color_earth_dark</item>
<item name="android:divider">@color/color_earth_white</item>
<item name="android:dividerHeight">1dp</item>
<item name="android:listSelector">@color/color_earth_light</item>
<item name="android:drawSelectorOnTop">false</item>
<item name="android:cacheColorHint">#000000</item>
</style>
<style name="ButtonLight.Plum" parent="@android:style/Widget.Holo.Button">
<item name="android:background">@color/color_earth_orange</item>
<item name="android:textColor">@color/color_earth_white</item>
<item name="android:layout_margin">10dp</item>
<item name="android:padding">8dp</item>
</style>
</resources>
答案 1 :(得分:0)
我认为这可能是你正在寻找的东西
<style name="White.Theme" parent="@style/myAppTheme">
<item name="android:windowBackground">@color/WHITE</item>
</style>