Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Load SVG on background thread issues #11

Open
cococow123 opened this issue Jul 23, 2020 · 0 comments
Open

Load SVG on background thread issues #11

cococow123 opened this issue Jul 23, 2020 · 0 comments

Comments

@cococow123
Copy link

cococow123 commented Jul 23, 2020

Hi, I am currently trying to load my remote SVGs from a background thread and having some difficulty.

First, this library works perfectly when I load on the main thread and it's awesome!

Second, even when running on the main thread: I will get an error with trying to use the .asBitmap() method when loading the SVG into an imageview and I get an error while trying to set a DiskCacheStrategy.

With background threads, I used the method asDrawable() and I tried both ways recommended on this page: Glide docs - background threads

When I try the first method, I get a java.lang.InterruptedException.
With the second method, I get up to the onLoadStarted event and not further. When turning off my device, it then runs the onLoadCleared event.

I am probably missing something basic, but any help would be appreciated.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant