views:

579

answers:

1

If I have a ListView with two different kinds of items, enabled and disabled ones (meaning selectable and non-selectable), Android draws a small divider correctly between the enabled items, but not between disabled items. Instead it draws a transparent divider, which causes really bad design issues. This has already been discussed here (Google Groups), but without any solution.

What I'm looking for is a way to force Android to draw the same divider which is being used between enabled items also to being used between disabled items instead of just leaving a transparent space.

+1  A: 

I've run into this problem as well and it saddens me that that is supposed to be the expected behavior. The only solution I can think of is to draw the dividers yourself by creating your own adapter that automatically adds them where appropriate.

Daniel Lew
I've been looking around for a while now and haven't found a proper solution as well. Will update this post as soon as I find one. For now I also use the custom adapter as a workaround.
znq