bentocorp / android

The customer Android app
0 stars 0 forks source link

Dish loading logic #182

Closed vcardillo closed 9 years ago

vcardillo commented 9 years ago
  1. Are you loading the images in the background? The first time I view the main or sides screens, the dishes always seem to be loading first. I thought you are loading these async in the bg before I even get to that page?
  2. Even after the images have loaded, I am still seeing the loading icon briefly. This is a bug in my opinion, and it needs to be fixed. Once the images have loaded, there shouldn't be a flash of the loading symbol again (unless, of course, the images are actually loading again for some reason). Once they are locally stored, I shouldn't see a loading symbol.
  3. This is related to 1. above, but are you also "lazy loading" the dish images? That is, are you waiting until I scroll down? As I scroll down, I also see the loading symbol flash for a second before it is replaced with the actual image of the dish. Why is this happening?

IMO everything should be loaded once, on a background thread, and then the user shouldn't see the loading symbol anymore once this initial caching is complete. Is there any reason why this can't be done?

xkokushox commented 9 years ago

There are two reasons why looks a little slow at displaying, first is because i download the image in the background just when the image is going to be displayed then store it locally, the second is because in the custom menu, i use lazy adapter, to display the image only at scroll, i do it for two reason, the first is because in some devices the list doesn't feel smoothly and the second is because there is some big error in android called OutOfMemoryError it causes the app crash http://stackoverflow.com/questions/477572/strange-out-of-memory-issue-while-loading-an-image-to-a-bitmap-object

What i can do is to remove the lazy adpter, but the displaying of the image is delegated to an external library to prevent OutOfMemoryError

vcardillo commented 9 years ago

So, do the images have to be loaded every single time? Are you saying that they can't ever be cached?

xkokushox commented 9 years ago

They are saved locally but could be a little slow to show, but just a little, i save them in memory and in local, i changed the list adapters to work as a normal (not lazy)

vcardillo commented 9 years ago

Okay. I think with a nicer more polished loading icon, this will be good enough then.