SimpleCursorAdapter和CursorAdapter [英] SimpleCursorAdapter and CursorAdapter

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

问题描述

我想知道CursorAdapter和SimpleCursorAdapter之间的区别。基于什么标准,有人会选择一个或另一个。您与他们合作的经验?
谢谢

I want to know what are the differences between CursorAdapter and SimpleCursorAdapter. Based on what criteria someone would choose the one or the other. Your experiences working with them? Thank you

推荐答案

我认为主要问题仍然没有回答。 SimpleCursorAdapter存在于那些想要节省一些时间来创建自己的CursorAdapter的人。 SimpleCursorAdapter已经从谷歌制作,你只是告诉他应该如何布局和你想要填充你的数据块的小部件的id,所以你不必重写CursorAdapter的方法并实现它们。但是你可以只使用TextView和ImageView在你的布局,因为它不支持更多的小部件,到目前为止。

I think that the main question is still not answered. SimpleCursorAdapter exists for those who want to save some time making their own CursorAdapter. SimpleCursorAdapter is already made from google and you just tell him how should the layout look like and what ids of widgets you want to fill with your chunks of data, so you dont have to override methods of CursorAdapter and implement them. But you can use only TextView and ImageView in your layout, because it doesn't support more widgets so far.

结果SimpleCursorAdapter像2行代码, CursorAdapter意味着更多,但你有更多的选择自定义。我相信SimpleCursorAdapter在大多数情况下应该足够了。

So as result SimpleCursorAdapter takes like 2 lines of code but extending CursorAdapter means lots more but you have more options for customization. I believe SimpleCursorAdapter should be enough in most cases.

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

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