使用的CursorAdapter的ListView分离 [英] ListView separators using a CursorAdapter

查看:163
本文介绍了使用的CursorAdapter的ListView分离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在使用的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://sunil-android.blogspot.com/2013/08/section-header-listview-in-android.html

项目: HTTP://$c$c.google.com/p/android-部分列表/

HTTP://$c$c.google.com/p / Android的惊人-列表视图/

最好的,

这篇关于使用的CursorAdapter的ListView分离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆