Does Glide have a method for loading both PNG and SVG?

后端 未结 7 1581
终归单人心
终归单人心 2020-11-29 06:34

I\'m using Glide to load some images asynchronously into some of my ImageViews, and I know it can handle images like PNG or

7条回答
  •  青春惊慌失措
    2020-11-29 07:15

    For Glide 4+ use this library called GlideToVectorYou which uses Glide internally.

    fun ImageView.loadSvg(url: String?) {
        GlideToVectorYou
            .init()
            .with(this.context)
            .setPlaceHolder(R.drawable.loading, R.drawable.actual)
            .load(Uri.parse(url), this)
    }
    

    Source: How to load remote svg files with Picasso library

提交回复
热议问题