views:

491

answers:

1

I have pretty unassuming preferences screen based on PreferenceActivity. (You can see it in DroidIn app) I'm having some problems with it that I think have to do with redrawing the screen after updates. Here are the symptoms:

  1. OnPreferenceChangeListener#onPreferenceChange if I change summary of the preference by doing Preference#setSummary the new value is painted over the old one creating unsightly effect
  2. My preferences screen is large enough that user has to scroll. While scrolling, the whole screen get all messed up, again it looks like view is redrawn (when scrolled) without erasing the background first.

Preferences are defined in XML file - nothing funky just some categories and preferences nested within <PreferenceScreen/>

Do I need to explicitly redraw the view? That seem excessive - why wouldn't that happen by default? Since this is an existing app - it's build and distributed with v. 1.5

P.S. I also want to mentioned that this behavior occurs in emulator and on G1 in both 1.1 and 1.5. It looks like I need to log it as a bug

+1  A: 

Problem solved!

Turned out that for whatever reason (probably just copying some example code without much thinking) I had this line in my theme.xml <item name="android:windowBackground">@null</item>. Once I removed it - my redrawing problem was gone

DroidIn.net