MCPcopy Create free account
hub / github.com/Tencent/libpag / setPathAsync

Method setPathAsync

android/libpag/src/main/java/org/libpag/PAGView.java:251–258  ·  view source on GitHub ↗

Asynchronously load a pag file from the specific path.

(String path, PAGFile.LoadListener listener)

Source from the content-addressed store, hash-verified

249 * Asynchronously load a pag file from the specific path.
250 */
251 public void setPathAsync(String path, PAGFile.LoadListener listener) {
252 NativeTask.Run(() -> {
253 setPath(path);
254 if (listener != null) {
255 listener.onLoad((PAGFile) pagPlayer.getComposition());
256 }
257 });
258 }
259
260 /**
261 * Returns the current PAGComposition for PAGView to render as content.

Callers

nothing calls this directly

Calls 4

RunMethod · 0.95
setPathMethod · 0.95
onLoadMethod · 0.80
getCompositionMethod · 0.45

Tested by

no test coverage detected