Question

TL;DR: How am I supposed to change the background of a SettingsActivity to be white or off-white to match Holo.Light? Changing the theme of the app changes the text but keeps the background as black.

I recently changed the theme of my application from default (Holo) to Holo.Light. Everything seemed to work perfectly until I opened my SettingsActivity and was greeted by this:

enter image description here

As you can see, all of the test is black on a black background.

This is the original:

enter image description here

I am trying to make the settingsActivity have a white background.

I have added the following to my Manifest:

<application
    ...
    android:theme="@android:style/Theme.Holo.Light" >
    ...
    <activity
        android:name="edu.purdue.SafeWalk.settings.SettingsActivity"
        ...
        android:theme="@android:style/Theme.Holo" >
    </activity>

However even the redundant theme setting does not help.

Obviously it is changing the theme of the text, but not the background which leads me to believe that I have manually overridden the background color. However I have not defined a layout for this SettingsActivity and I see no XML or Java that sets the background.

I can post whatever other relevant code here, but the source is public here.

How am I supposed to change the background of a SettingsActivity to be white or off-white to match Holo.Light?

Was it helpful?

Solution

You'll want to remove

view.setBackgroundColor(getResources().getColor(android.R.color.black));

from line 101 of SettingsFragment.java, cheers!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top