本文整理汇总了Java中com.bumptech.glide.util.Util.getSnapshot方法的典型用法代码示例。如果您正苦于以下问题:Java Util.getSnapshot方法的具体用法?Java Util.getSnapshot怎么用?Java Util.getSnapshot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.bumptech.glide.util.Util
的用法示例。
在下文中一共展示了Util.getSnapshot方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: pauseRequests
import com.bumptech.glide.util.Util; //导入方法依赖的package包/类
/**
* Stops any in progress requests.
*/
public void pauseRequests() {
isPaused = true;
for (Request request : Util.getSnapshot(requests)) {
if (request.isRunning()) {
request.pause();
pendingRequests.add(request);
}
}
}
示例2: resumeRequests
import com.bumptech.glide.util.Util; //导入方法依赖的package包/类
/**
* Starts any not yet completed or failed requests.
*/
public void resumeRequests() {
isPaused = false;
for (Request request : Util.getSnapshot(requests)) {
if (!request.isComplete() && !request.isCancelled() && !request.isRunning()) {
request.begin();
}
}
pendingRequests.clear();
}
示例3: clearRequests
import com.bumptech.glide.util.Util; //导入方法依赖的package包/类
/**
* Cancels all requests and clears their resources.
*
* <p>After this call requests cannot be restarted.
*/
public void clearRequests() {
for (Request request : Util.getSnapshot(requests)) {
clearRemoveAndRecycle(request);
}
pendingRequests.clear();
}
示例4: restartRequests
import com.bumptech.glide.util.Util; //导入方法依赖的package包/类
/**
* Restarts failed requests and cancels and restarts in progress requests.
*/
public void restartRequests() {
for (Request request : Util.getSnapshot(requests)) {
if (!request.isComplete() && !request.isCancelled()) {
// Ensure the request will be restarted in onResume.
request.pause();
if (!isPaused) {
request.begin();
} else {
pendingRequests.add(request);
}
}
}
}
示例5: onStart
import com.bumptech.glide.util.Util; //导入方法依赖的package包/类
void onStart() {
isStarted = true;
for (LifecycleListener lifecycleListener : Util.getSnapshot(lifecycleListeners)) {
lifecycleListener.onStart();
}
}
示例6: onStop
import com.bumptech.glide.util.Util; //导入方法依赖的package包/类
void onStop() {
isStarted = false;
for (LifecycleListener lifecycleListener : Util.getSnapshot(lifecycleListeners)) {
lifecycleListener.onStop();
}
}
示例7: onDestroy
import com.bumptech.glide.util.Util; //导入方法依赖的package包/类
void onDestroy() {
isDestroyed = true;
for (LifecycleListener lifecycleListener : Util.getSnapshot(lifecycleListeners)) {
lifecycleListener.onDestroy();
}
}
示例8: onStart
import com.bumptech.glide.util.Util; //导入方法依赖的package包/类
@Override
public void onStart() {
for (Target<?> target : Util.getSnapshot(targets)) {
target.onStart();
}
}
示例9: onStop
import com.bumptech.glide.util.Util; //导入方法依赖的package包/类
@Override
public void onStop() {
for (Target<?> target : Util.getSnapshot(targets)) {
target.onStop();
}
}
示例10: onDestroy
import com.bumptech.glide.util.Util; //导入方法依赖的package包/类
@Override
public void onDestroy() {
for (Target<?> target : Util.getSnapshot(targets)) {
target.onDestroy();
}
}
示例11: getAll
import com.bumptech.glide.util.Util; //导入方法依赖的package包/类
public List<Target<?>> getAll() {
return Util.getSnapshot(targets);
}