For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/lynx-native-api/lynx-media-resource-fetcher/fetch-image.md.
Lynx
  • 简体中文
  • fetchImage

    LynxEngine 会调用此方法来获取图片的位图信息,返回内容必须是 Closeable 类型。

    语法

    Android

    public void fetchImage(LynxResourceRequest request, LynxResourceCallback<Closeable> callback);

    参数说明

    • request: 资源请求。
    • callback: 包含所需 drawable 的响应。
    Note
    • 此方法为可选实现。

    iOS

    - (dispatch_block_t)fetchUIImage:(LynxResourceRequest *_Nonnull)request
                          onComplete:(LynxMediaResourceCompletionBlock _Nonnull)response;

    参数说明

    • request: 资源请求。
    • response: 包含所需 drawable 的响应。
    Note
    • 此方法为可选实现。

    兼容性

    LCD tables only load in the browser

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。