Android的 - 光标装载机 [英] Android - Cursor Loader

查看:197
本文介绍了Android的 - 光标装载机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用光标loader.I开始按照本教程<一个href=\"http://responsiveandroid.com/2012/03/19/using-an-android-cursor-loader-with-a-content-provider.html\" rel=\"nofollow\">http://responsiveandroid.com/2012/03/19/using-an-android-cursor-loader-with-a-content-provider.html但不能understand.tutorial把我在混乱。

I've been trying to use cursor loader.I started following this tutorial http://responsiveandroid.com/2012/03/19/using-an-android-cursor-loader-with-a-content-provider.html but could not understand.tutorial put me in chaos.

据我所知cursorloader是一个适配器,适配器的工作就是去内容提供商获取数据,然后将数据放入到视图。

As far i know cursorloader is an adapter,adapter job is go to content provider take data then put the data in to view.

什么是内容解析器办?

Android的文件说SimpleCursorAdapter是德preciated并说使用光标适配器,这是我说的教程<一个href=\"http://responsiveandroid.com/2012/03/19/using-an-android-cursor-loader-with-a-content-provider.html\" rel=\"nofollow\">http://responsiveandroid.com/2012/03/19/using-an-android-cursor-loader-with-a-content-provider.html

Android document says SimpleCursorAdapter is depreciated and says to use cursor adapter,this is the tutorial that i was talking http://responsiveandroid.com/2012/03/19/using-an-android-cursor-loader-with-a-content-provider.html

在这里,他同时使用simplecursoradapter和光标loader.Why是什么?任何一个可以解释我,怎么用光标装载机?

Here he uses both simplecursoradapter and cursor loader.Why is that ? Can any one explain me ,how to use cursor loader ?

推荐答案

您混为一谈两回事。

一个cursorloader获取从数据源并将其加载数据到光标则管理光标。游标基本上是一个内存中的数据存储结构。

A cursorloader gets that data from your data source and loads it into a cursor then manages the cursor. A cursor is basically an in memory data storage construct.

这是适配器从光标(或数组或列表)开出的数据,并把到您的显示布局来看待。

An adapter takes the data from the cursor (or array or list) and puts into your display layout to be viewed.

这篇关于Android的 - 光标装载机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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