@Override
public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor c) {
// List of categories
if (cursorLoader.getId() == -1) {
// Empty view visibility
mEmptyView.setVisibility(c.getCount() > 0 ? View.GONE : View.VISIBLE);
if (mCurrentCategoriesCursor != null) {
if (!isCategoriesListModified(mCurrentCategoriesCursor, c)) {
// no actual modification, no need to rebuild all the rows
mCurrentCategoriesCursor = c; // keep the reference to the new cursor because the old one won't be valid anymore
return;
}
}
mCurrentCategoriesCursor = c;
loadCategoriesRows(c);
}
// One of the row
else {
CursorObjectAdapter adapter = mAdaptersMap.get(cursorLoader.getId());
if (adapter != null) {
adapter.changeCursor(c);
}
}
}
MoviesByFragment.java 文件源码
java
阅读 38
收藏 0
点赞 0
评论 0
项目:aos-Video
作者:
评论列表
文章目录