问题描述
我有一个正在使用的CursorAdapter填充一个ListView。我也想有一些分离器在我的ListView。我已经做到了这一点与ArrayAdapter,但我不知道如何做到这一点的,CursorAdapter的。是否有这样做的任何策略?还是我的运气?
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?
推荐答案
您可以按照此示例,使基于自定义状态分离/头。请检查: http://thebogles.com/blog/2010/02/科头换Android的列表视图/
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/
更新04/2014:
更改为新的样本,因为旧的不工作: http://bartinger.at/listview-with-sectionsseparators/
Change to new samples because old one not work:http://bartinger.at/listview-with-sectionsseparators/
的
项目: HTTP://$c$c.google.com/p/android-部分列表/
HTTP://$c$c.google.com/p / Android的惊人-列表视图/
最好的,
这篇关于使用的CursorAdapter的ListView分离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!