Hello i asked the same question few days ago on StackOverflow but no answer...and i kinda need an answer
The problem is that Glide .listener() is triggered image by image, so when i tried to set my fragment layout invisible until all images are loaded, it set's fragment layout visibility to visible after first image is loaded and ignores the fact that rest of images are still not loaded into imageview.
Glide checks with it's listener images by images and after first one is ready it set's my visibility t visible and i do not want this..i want to my fragment layout be invisible until all images are ready to display. Now i will basically past my SstockOverflow post here.
i have a fragment with several recycleviews that contain some text and image from users. Problem is that my images are loaded a second or less after my layout is inflated. I can't use any placeholder for that time or something else.
My instructions are that my layout must be shown only when all data and images are ready from all recyclerviews, and be shown in the same time. I am using glide .listener() method.
I tried: 1)to set boolean value in .listener() and save it in SharedPref and load it in my fragment where my recycleviews are and if Boolean value is the same then set visibility of fragment to visible ,which previously was set to invisible
2) to do the same thing just with custom callbacks
3)and this solution that i am going to past here. Basically i am passing my layout to adapter with constructor and setting it invisible in .listener().
my glide in adapter:
and my adapter:
What could go wrong in a swell place like "The Evil Eye"? Or with this tiny ad?