SVG

February 27, 2025 · View on GitHub

Translations: 简体中文

Sketch supports decoding SVG static images, powered by SvgDecoder

Install component

${LAST_VERSION}: Download (Not included 'v')

implementation("io.github.panpf.sketch4:sketch-svg:${LAST_VERSION}")

Important

sketch-svg The module supports automatic registration of components. For details on component registration, please see the documentation: 《Register component》

Configure

ImageRequest and ImageOptions support some svg-related configurations, as follows:

ImageRequest(context, "https://www.example.com/image.svg") {
    svgBackgroundColor(Color.WHITE)
    svgCss("...")    // Only Android
}