Skip to content Skip to sidebar Skip to footer

Loading Images From Firestore Into A Recyclerview When There Are Multiple Image Types

I have a RecyclerView which uses a GridLayoutManager and each cell consists of a single ImageView. The data that i want to use to populate it are stored in my Firestore storage as

Solution 1:

Not the smartest one but the easier method is to in onFailure method for fetching of*.png run the same fetch for *.jpeg. And only after that handle error.

This is in case you don't have something like 'exist(name)' method in Firestore (simply I'm not familiar with it)

Post a Comment for "Loading Images From Firestore Into A Recyclerview When There Are Multiple Image Types"