Try this
String background_chooser = getPrefs
.getString("prefSetBackground", "1");
Instead of
String background_chooser = getPrefs
.getString("prefSetBackground", "0");
Edit : Also set android:defaultValue="1"
in pref xml file.
so now your list pref xml should be like this
<ListPreference
android:key="prefSetBackground"
android:entries="@array/backgroundColors"
android:summary="Set the background color of the main page."
android:entryValues="@array/backgroundColorEntries"
android:title="@string/pref_1"
android:defaultValue="1" />
You also need to replace this
<string-array name="backgroundColorEntries">
<item name="1">#FF0000</item>
<item name="2">#00FF00</item>
<item name="3">#0000FF</item>
<item name="4">#FFFF00</item>
</string-array>
By this
<string-array name="backgroundColorEntries">
<item name="1">1</item>
<item name="2">2</item>
<item name="3">3</item>
<item name="4">4</item>
</string-array>