Loads a pag file from the specified path, returns false if the file does not exist or the data is not a pag file. The path starts with "assets://" means that it is located in assets directory. Note: All PAGFiles loaded by the same path share the same internal cache. The internal cache remains alive
(String path)
| 234 | * instead if you don't want to load a PAGFile from the internal caches. |
| 235 | */ |
| 236 | public boolean setPath(String path) { |
| 237 | PAGFile pagFile; |
| 238 | if (path != null && path.startsWith("assets://")) { |
| 239 | pagFile = PAGFile.Load(getContext().getAssets(), path.substring(9)); |
| 240 | } else { |
| 241 | pagFile = PAGFile.Load(path); |
| 242 | } |
| 243 | setComposition(pagFile); |
| 244 | filePath = path; |
| 245 | return pagFile != null; |
| 246 | } |
| 247 | |
| 248 | /** |
| 249 | * Asynchronously load a pag file from the specific path. |
no test coverage detected