Skip to content

Samples of loading SVG files from assets and network into an ImageView by using Glide and AndroidSVG

Notifications You must be signed in to change notification settings

thuytrinh/SvgSamples

Repository files navigation

SvgSamples

Samples of loading SVG files from assets and network into an ImageView by using Glide and AndroidSVG

val svgFileName = "android.svg"

// Show the SVG file by Glide.
val svgUri = Uri.parse("file:///android_asset/$svgFileName")
Glide.with(this)
  .`as`(PictureDrawable::class.java)
  .transition(DrawableTransitionOptions.withCrossFade())
  .listener(SvgSoftwareLayerSetter())
  .load(svgUri)
  .into(glideSvgImageView)

// Show the SVG file by SVGImageView.
androidSvgImageView.setImageAsset(svgFileName)

samples

About

Samples of loading SVG files from assets and network into an ImageView by using Glide and AndroidSVG

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published