{"action":"created","issue":{"url":"https://api.github.com/repos/xbmc/Kore/issues/128","labels_url":"https://api.github.com/repos/xbmc/Kore/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/xbmc/Kore/issues/128/comments","events_url":"https://api.github.com/repos/xbmc/Kore/issues/128/events","html_url":"https://github.com/xbmc/Kore/pull/128","id":112986804,"number":128,"title":"Implemented using poster image from gridview item as placeholder","user":{"login":"poisdeux","id":4527626,"avatar_url":"https://avatars.githubusercontent.com/u/4527626?v=3","gravatar_id":"","url":"https://api.github.com/users/poisdeux","html_url":"https://github.com/poisdeux","followers_url":"https://api.github.com/users/poisdeux/followers","following_url":"https://api.github.com/users/poisdeux/following{/other_user}","gists_url":"https://api.github.com/users/poisdeux/gists{/gist_id}","starred_url":"https://api.github.com/users/poisdeux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poisdeux/subscriptions","organizations_url":"https://api.github.com/users/poisdeux/orgs","repos_url":"https://api.github.com/users/poisdeux/repos","events_url":"https://api.github.com/users/poisdeux/events{/privacy}","received_events_url":"https://api.github.com/users/poisdeux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-23T09:33:29Z","updated_at":"2015-10-27T20:08:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xbmc/Kore/pulls/128","html_url":"https://github.com/xbmc/Kore/pull/128","diff_url":"https://github.com/xbmc/Kore/pull/128.diff","patch_url":"https://github.com/xbmc/Kore/pull/128.patch"},"body":"In most detailed views of a music album, tv show, or movie, the same image is\r\nshown as is used in the overview of artists/albums, tv shows, or movies.\r\nInstead of showing a CharacterDrawable as placeholder while the poster is loading\r\nwe now show the image from the overview as placeholder."},"comment":{"url":"https://api.github.com/repos/xbmc/Kore/issues/comments/151628106","html_url":"https://github.com/xbmc/Kore/pull/128#issuecomment-151628106","issue_url":"https://api.github.com/repos/xbmc/Kore/issues/128","id":151628106,"user":{"login":"SyncedSynapse","id":6040384,"avatar_url":"https://avatars.githubusercontent.com/u/6040384?v=3","gravatar_id":"","url":"https://api.github.com/users/SyncedSynapse","html_url":"https://github.com/SyncedSynapse","followers_url":"https://api.github.com/users/SyncedSynapse/followers","following_url":"https://api.github.com/users/SyncedSynapse/following{/other_user}","gists_url":"https://api.github.com/users/SyncedSynapse/gists{/gist_id}","starred_url":"https://api.github.com/users/SyncedSynapse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SyncedSynapse/subscriptions","organizations_url":"https://api.github.com/users/SyncedSynapse/orgs","repos_url":"https://api.github.com/users/SyncedSynapse/repos","events_url":"https://api.github.com/users/SyncedSynapse/events{/privacy}","received_events_url":"https://api.github.com/users/SyncedSynapse/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T20:08:40Z","updated_at":"2015-10-27T20:08:40Z","body":"There's a simpler way to achieve this: rely on Picasso cache. Check out the attached diff and see if it does what you want (change the file extension). Note that it only changes the movie and tv show list, not the album list, but i think there's not really an issue there.\r\n\r\nThe thing is, Picasso has a cache which takes into account the image url and its size. The size can and is setted (?) programatically, but the list and the details fragments were using different sizes, so in the details screen the cached version wasn't being used. If the sizes are equal the cache version is used and the CharacterDrawable is avoided. \r\n\r\nInitially i used different sizes to conserve memory in the list (where the images are smaller), but i'm not sure that is very useful. Using different sizes for the list and the detail duplicates the image in the cache, which can negate the benefit of a smaller cache footprint in the list.\r\n\r\nRelated to this is the use of the constant `UIUtils.IMAGE_RESIZE_FACTOR`. This was used in the list to further lighten the cache, but it has always been assigned 1.0, so it hasn't got any effect. To see this whole cache working, apply the patch, then play with the constant and you'll see that when it isn't 1.0 you'll get a CharacterDrawable.\r\n\r\nIf this was your goal, i would prefer this solution for now. I see merit in having the image being handled from the list to the detail, but to achieve something else: make a transition animation in which the image in the list transitions into its place on the detail (one of the standard animations introduced in Lollipop). I implemented a version of it a while ago, but it wasn't perfect so i ditched it, but i plan to review it.\r\n\r\nPS. I'll be checking if this change has any impact on the memory footprint, but i appreciate if you could check too.\r\n\r\n[art.diff.txt](https://github.com/xbmc/Kore/files/21969/art.diff.txt)\r\n\r\n"}}