I have a ListView which is populated using a CursorAdapter. I'd also like to have some separators in my ListView. I have accomplished this with an ArrayAdapter, but I'm not sure how to accomplish this with a CursorAdapter. Are there any strategies for doing so? Or am I out of luck?
+4
A:
Hi ,
You can follow this sample to make separator/header based in custom condition. Please check: http://thebogles.com/blog/2010/02/section-headers-for-android-listviews/
Best,
fpanizza
2010-10-05 16:12:41
Thanks for your reply. I'll have a look
Andrew
2010-10-05 16:21:36
Ah, I see what you're doing. The layout for every list item contains a LinearLayout which acts as a separator, but some contraint determines whether you hide or show the LinearLayout. I don't think the constraint is particularly important other than it works, but the separator is ultimately present in every item. Neat idea. I think I will try it out. Thanks again
Andrew
2010-10-05 16:25:07