1 前言
It is based on theTODO-MVPsample and uses Loaders to get the data from the tasks repository.
基于Mvp模式基础TODO-MVP,使用Loaders用任务请求获取数据
2 基本结构
The advantages of Loaders, from theLoaders documentation page, are:
从Loaders文档上可以看出,Loaders的优点是:
They provide asynchronous loading of data, removing the need for callbacks in the repository.
Loaders提供异步加载数据,移除库repository中需要的请求回调。
They monitor the source of their data and deliver new results when the content changes, in our case, the repository.
Loaders会监视数据来源,根据数据内容的变化,提供