I have a PreferenceCategory , xml file, and I defined all its preferences, I call it from a class that extends PreferenceActivity . I can not set the background of my settings screen, this screen is displayed using the xml file shown below. Look that I already defined android:background="#041A37" , but the default color still remains: black.
public class MyPreferenceActivity extends PreferenceActivity { @Override public void onCreate(Bundle savedInstanceState) { Context mContext=super.getBaseContext(); super.onCreate(savedInstanceState); addPreferencesFromResource(R.layout.preference);
preference.xml
<?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:background="#041A37" > <PreferenceCategory> <com.dropcall.SeekBarPreference android:background="#041A37" android:defaultValue="5" android:key="@string/Interference_Delay" android:progressDrawable="@drawable/seekbardrawable" android:title="Seconds Delay until intereference" /> <com.dropcall.SeekBarPreference2 android:defaultValue="30" android:key="@string/Drop_Delay" android:progressDrawable="@drawable/seekbardrawable" android:title="Seconds delay until drop" /> <CheckBoxPreference android:background="@drawable/state_normal" android:defaultValue="true" android:key="@string/Drop_Option" android:title="Close after call drop" /> <CheckBoxPreference android:background="@drawable/state_normal" android:defaultValue="true" android:key="@string/Timer_Option" android:title="Start timers on launch" /> </PreferenceCategory> </PreferenceScreen>
Although I set android:background="#041A37" in each file, the background does not turn blue or any other color. The default color remains black. How to change the background color. Please let me know any pointers / tips if you encounter the same problem, let me know what changes you made to set the background color.
android android-emulator
David Prun Aug 23 '10 at 19:54 2010-08-23 19:54
source share