glidex icon indicating copy to clipboard operation
glidex copied to clipboard

Question - How can we use SVG ?

Open AntM90 opened this issue 5 years ago • 5 comments

Hi Jonathan,

Thanks for this package ... I've been using FFImageLoading for a long time but many bugs with recents version of Xamarin Forms discouraged me.

I would try your package in my app, but can I use svg files and how can I configure glidex to work like this ?

Thanks :)

AntM90 avatar Apr 05 '19 15:04 AntM90

Looks like Glide has a Java sample using SVG files here.

But it looks like you have to write a bunch of code to make it work...

Parts of Glide on the Java side use compile-time annotations, so I'm not sure there is a simple way to set this up with Xamarin.Android. We would have to add a feature to enable javac calls to process custom annotations.

If I have time, I will see if there is a way to make this work without using annotations.

jonathanpeppers avatar Apr 05 '19 15:04 jonathanpeppers

@jonathanpeppers now that Xamarin introduced paths maybe it can somehow be achieved?

themronion avatar Sep 15 '20 20:09 themronion

@themronion can you share a link of what you are referring to?

Xamarin.Android does not have Java annotation support.

jonathanpeppers avatar Sep 15 '20 20:09 jonathanpeppers

@jonathanpeppers yeah, sorry, i think it is possible somehow only for xamarin.forms. Here is what i was referring too: click

themronion avatar Sep 16 '20 06:09 themronion

Ok yeah, @themronion this looks like it is using <Path/> that came with the new shapes features in Xamarin.Forms 4.8.

I would use <Path/> directly for an .svg file, that seems like a reasonable choice. glidex could be useful at some point if you needed to download .svg files from the internet, but they can also be pretty small in file size compared to other image types.

jonathanpeppers avatar Sep 16 '20 13:09 jonathanpeppers