Monday, April 30, 2012

[android-developers] listSeparatorTextViewStyle weirdness between SDK versions 10 and 11

Howdy All,

I have come across some weird behavior while writing an app using ListView and I was hoping to solve and/or report.

The application in question is based on a ListActivity and employs section headers.  Each list item contains two TextViews (top == section header, bottom == text).  A custom CursorAdapter selectively hides (View.GONE) the section header.  Also, the section header TextView uses listSeparatorTextViewStyle.

In SDK 10, the section header is styled differently from the text and does not highlight when pressed.  In SDK 11 (Holo Dark theme), however, the header glows blue when the list item is pressed.  I've narrowed the differences in SDK down to the two 9patch images used by the two themes.  SDK 10 uses drawable/dark_header_dither (which is colored) and SDK 11 uses drawable/list_section_divider_holo_dark (which is transparent).

Can anyone tell me whether or not this behavior is intentional?  Is there a solution or workaround if one wishes to stay true to the Holo theme?  Is it possible that Honeycomb forward has a different approach to list section headers?

If Romain Guy is reading this, I'd love his input.

Very truly yours,

You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment