0

I managed to change my preference activity's background color, but when I focus/scroll it, it blinks. Please help me solve this. This is how i change my background...

public class ConfigActivity extends PreferenceActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);     
    addPreferencesFromResource(R.xml.preference);
    findViewById(android.R.id.list).setBackgroundColor(getResources().getColor(R.color.gray));
}

}

djargonforce
  • 259
  • 1
  • 3
  • 8
  • Add some code, how did you change the background color ? If you use a PreferenceFragment, try overriding onViewCreated :@Override public void onViewCreated(View view, Bundle savedInstanceState) { view.setBackgroundResource(android.R.color.white); } – Quanturium Mar 12 '13 at 01:35
  • Please add more details your question. Some code examples or anything. They way it is right now is very hard to offer any help. – fmendez Mar 12 '13 at 01:35
  • i edited the question. please help – djargonforce Mar 12 '13 at 01:46

1 Answers1

0

Use android:cacheColorHint="#00000000" in your layout.

See also http://android-developers.blogspot.com/2009/01/why-is-my-list-black-android.html

Emanuel Moecklin
  • 28,488
  • 11
  • 69
  • 85