博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
nullnullDefining and Launching the Query 定义和启动查询
阅读量:6263 次
发布时间:2019-06-22

本文共 2171 字,大约阅读时间需要 7 分钟。

PS:今天上午,非常郁闷,有很多简单基础的问题搞得我有些迷茫,哎,代码几天不写就忘。目前又不当COO,还是得用心记代码哦!

    To perform a query, create the , set up its query, and pass it to the loader framework. From then on, the framework manages everything. It runs the query on a background thread, returns the results to the foreground, and watches for changes to the data associated with the query. http://blog.csdn.net/sergeycao

    Pass a to the loader framework in your implementation of. The loader framework calls this method when youcreate a loader by calling . You can create a anywhere, but the preferred way is to create it in, because this defers creation until the object is actually needed.

    Notice that will only if the doesn't already exist; otherwise, it re-uses the existing. The loader framework tracks instance using theid value passed to .

    

Define and Launch the Query

    每日一道理
微笑,是春天里的一丝新绿,是秋日里的一缕阳光,是骄阳下的一片浓荫,是冬雪中的一株梅红……微笑着去面对吧,你会感到人生是那样的温馨与甜蜜!

    To create a and define its query at the same time, call the constructor. Thecontext and uri arguments are required, but the others are optional. To use the default value for an optional argument, pass innull. The runs the query against the identified by uri, just as if you had called with the same arguments.

    For example:

public Loader
onCreateLoader(int loaderID, Bundle bundle){ /* * Takes action based on the ID of the Loader that's being created */ switch (loaderID) { case URL_LOADER: /* * Return a new CursorLoader */ return new CursorLoader( this, // Context DataProviderContract.IMAGE_URI, // Provider's content URI PROJECTION, // Columns to return null, // Return all rows null, // No search arguments null); // Default search order default: // An invalid id was passed in return null; }}

文章结束给大家分享下程序员的一些笑话语录: AdobeFlash拖垮Windows拖垮IE!又拖垮Linux拖垮Ubuntu拖垮FirxEox!还拖垮BSD拖垮MacOS拖垮Safri!简直无所不拖!AdobeFlash滚出网路世界!不要以为市占有率高就可以持续出烂货产品!以后替代品多得是!

你可能感兴趣的文章
Coding and Paper Letter(二十六)
查看>>
走进JavaWeb技术世界13:Hibernate入门经典与注解式开发
查看>>
下拉菜单;手风琴;九宫格的Jquery的使用实例
查看>>
String intern驻足
查看>>
使用Charles对Android App的https请求进行抓包
查看>>
开发笔记3 | Java 代码规约第 2 条
查看>>
浅谈CSRF攻击方式
查看>>
2017 Multi-University Training Contest - Team 1 1011&&HDU 6043 KazaQ's Socks【规律题,数学,水】...
查看>>
第1天,Python入门
查看>>
canvas裁剪之后的base64转换为上传文件blob对象
查看>>
高级开发全面技能要求
查看>>
数据库主从表,主外键,表更新、删除
查看>>
JavaScript学习之旅-11(原创)
查看>>
背包九讲问题
查看>>
bootstrap模态框可拖动
查看>>
将黑苹果中的的Terminal和Bash for Windows美化了一下
查看>>
Java反射 - 字段
查看>>
sqlserver jbpm 4.4 建表语句
查看>>
如何自学图像编程
查看>>
十分钟上线-函数计算玩转wordpress
查看>>