设置背景颜色为所有应用程序使用夏洛克酒吧



我想把所有活动的背景设置为白色。仍然没有找到的方式如何做是简单的,它会改变我的文字颜色为黑色。我在一些活动中使用了夏洛克酒吧,我想这是我的问题。我的manifest是这样的:

<application
        android:icon="@drawable/rss"
        android:label="@string/app_name"
        android:theme="@style/CustomTheme"
         >
        <activity
            android:name=".ListRss"
            android:label="@string/title_activity_listr_rss"
            android:theme="@style/Theme.Sherlock" >
        </activity>
        <activity android:name="RssItem" >
        </activity>
        <activity android:name="editRss.AddNewRss">
        </activity>
        <activity android:name="openRssItem.WebActivity" >

where my style

   <style name="CustomWindowTitleBackground">
        <item name="android:background">#FFFFFF</item>
    </style>
    <style name="CustomTheme" parent="android:Theme">
         <item name="android:background">#FFFFFF</item>
        <item name="android:windowTitleSize">35dip</item>
        <item name="android:windowTitleBackgroundStyle">@style/CustomWindowTitleBackground</item>
    </style>

和我的活动,例如

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/BackgroundColor"
android:id="@+id/myScreen">
<LinearLayout 
    android:id="@+id/linearLa"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    >
    <ImageView
        android:id="@+id/image"
        android:layout_width="50dip"
        android:layout_height="50dip"
        android:scaleType="centerCrop"
        android:src="@drawable/rss" />

将很高兴收到一个简单的解决方案,解决背景颜色为白色,文本为黑色。

你不能使用android:Theme作为你的主题的父主题,如果你想使用ActionBarSherlock(除非你想覆盖一切…)。如果你想要浅色的主题,你必须使用这个:

<style name="CustomTheme" parent="Theme.Sherlock.Light">
[...]
</style>

最新更新