本文整理了Java中android.support.v4.content.Loader.onReset()
方法的一些代码示例,展示了Loader.onReset()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Loader.onReset()
方法的具体详情如下:
包路径:android.support.v4.content.Loader
类名称:Loader
方法名:onReset
[英]Subclasses must implement this to take care of resetting their loader, as per #reset(). This is not called by clients directly, but as a result of a call to #reset(). This will always be called from the process's main thread.
[中]子类必须实现这一点,以便按照#reset()重置其加载程序。这不是客户端直接调用的,而是调用#reset()的结果。这将始终从进程的主线程调用。
代码示例来源:origin: com.google.android/support-v4
/**
* Resets the state of the Loader. The Loader should at this point free
* all of its resources, since it may never be called again; however, its
* {@link #startLoading()} may later be called at which point it must be
* able to start running again.
*
* <p>This updates the Loader's internal state so that
* {@link #isStarted()} and {@link #isReset()} will return the correct
* values, and then calls the implementation's {@link #onReset()}.
*
* <p>Must be called from the process's main thread.
*/
public void reset() {
onReset();
mReset = true;
mStarted = false;
mAbandoned = false;
mContentChanged = false;
}
代码示例来源:origin: kingargyle/adt-leanback-support
/**
* Resets the state of the Loader. The Loader should at this point free
* all of its resources, since it may never be called again; however, its
* {@link #startLoading()} may later be called at which point it must be
* able to start running again.
*
* <p>This updates the Loader's internal state so that
* {@link #isStarted()} and {@link #isReset()} will return the correct
* values, and then calls the implementation's {@link #onReset()}.
*
* <p>Must be called from the process's main thread.
*/
public void reset() {
onReset();
mReset = true;
mStarted = false;
mAbandoned = false;
mContentChanged = false;
mProcessingChange = false;
}
代码示例来源:origin: L4Digital/RxLoader
@Override
protected void onReset() {
super.onReset();
onStopLoading();
mDataCache = null;
if (mSubscriber != null) {
mSubscriber.reset();
}
}
内容来源于网络,如有侵权,请联系作者删除!