GetView比。 BindView在自定义的CursorAdapter? [英] GetView Vs. BindView in a custom CursorAdapter?

查看:147
本文介绍了GetView比。 BindView在自定义的CursorAdapter?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我在看这个视频 http://www.youtube.com/watch?v=N6YdwzAvwOA和罗曼盖伊是展示了如何使用 getView()方法,能够更有效地UI适配code。这是否适用于CursorAdapters呢?我目前使用 bindView() NewView的()我的自定义光标适配器。我应该使用getView呢?

So, I'm watching this video http://www.youtube.com/watch?v=N6YdwzAvwOA and Romain Guy is showing how to make more efficient UI adapter code using the getView() method. Does this apply to CursorAdapters as well? I'm currently using bindView() and newView() for my custom cursor adapters. Should I be using getView instead?

推荐答案

的CursorAdapter 有一个执行 getView()委托给 NewView的() bindView(),作为强制行循环模式这样一种方式。因此,你不需要做什么特别的事情了的CursorAdapter 为行回收,如果要覆盖 NewView的() bindView()

CursorAdapter has an implementation of getView() that delegates to newView() and bindView(), in such a way as enforces the row recycling pattern. Hence, you do not need to do anything special with a CursorAdapter for row recycling if you are overriding newView() and bindView().

这篇关于GetView比。 BindView在自定义的CursorAdapter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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