mcd-3 / cubed-game-collector

An app made to keep track of Nintendo Gamecube games, consoles, and accessories!
MIT License
1 stars 0 forks source link

Can only set cover art once #11

Closed mcd-3 closed 4 years ago

mcd-3 commented 4 years ago

Once you save an image, you need to close the app and reopen it to save another image

mcd-3 commented 4 years ago

NOTE: The image IS being saved! It is correctly being passed to MainActivity. But for some reason it is not being displayed correctly

mcd-3 commented 4 years ago

Tried using Glide, still doesn't work. Adding signature to it still won't work. Clearing Glide cache also does not work. Maybe it is using old listener?

mcd-3 commented 4 years ago

Clearing app cache also does not work

mcd-3 commented 4 years ago

SOLVED: The reason was because instead of finding the ImageView by ID manually (findViewById), I was instead using the cached version (cover_art_image_view). Since it is always cached, it always shows as "not null" even when it is. So by using findViewById, we can be confident that the ImageView is not cached and can be null, so we place checks to see if it isn't null and put the Bitmap there accordingly.