Open sunytan opened 3 years ago
It's a little more complicated than just using the callback executor because we don't want to post to the UI thread if we're loading an image into a View on the main thread. Doing so would add an unnecessary delay and lead to blinking images.
I see your point though, that we should be consistent about using the callback executor.
We could probably update the mainThreadExecutor to just execute directly if we're on the main thread. It's a bit weird either way.
Thank you for your reply
Glide Version:4.10.0
Integration libraries:3.12.6
Device/Android Version:SLA-AL00;Android 7.0,level 24
Issue details / Repro steps / Use case background:
className: Engine.java
when memoryResource not null , why not call onResourceReady with callbackExecutor. it cause
CalledFromWrongThreadException
Glide load line /
GlideModule
(if any) / list Adapter code (if any):call glide.with in sub thread
Layout XML:
Stack trace / LogCat: