{"action":"created","comment":{"url":"https://api.github.com/repos/xbmc/Kore/pulls/comments/47682021","id":47682021,"diff_hunk":"@@ -225,70 +235,39 @@ public void onSuccess(String result) {\n             public void onError(int errorCode, String description) {\n                 if (!isAdded()) return;\n                 Toast.makeText(getActivity(),\n-                        String.format(getString(R.string.general_error_executing_action), description),\n-                        Toast.LENGTH_SHORT)\n-                        .show();\n+                               String.format(getString(R.string.general_error_executing_action), description),\n+                               Toast.LENGTH_SHORT)\n+                     .show();\n             }\n         }, callbackHandler);\n     }\n \n-    /**\n-     * Display the addon details\n-     *\n-     * @param addonDetails Addon details\n-     */\n-    private void displayAddonDetails(AddonType.Details addonDetails) {\n-        mediaTitle.setText(addonDetails.name);\n-        mediaUndertitle.setText(addonDetails.summary);\n-\n-        mediaAuthor.setText(addonDetails.author);\n-        mediaVersion.setText(addonDetails.version);\n-\n-        mediaDescription.setText(addonDetails.description);\n-\n-        // Images\n+    private void setImages(String poster, String fanart) {\n         Resources resources = getActivity().getResources();\n         DisplayMetrics displayMetrics = new DisplayMetrics();\n         getActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);\n-\n         int artHeight = resources.getDimensionPixelOffset(R.dimen.now_playing_art_height),\n                 artWidth = displayMetrics.widthPixels;\n-        if (!TextUtils.isEmpty(addonDetails.fanart)) {\n-            int posterWidth = resources.getDimensionPixelOffset(R.dimen.addondetail_poster_width);\n-            int posterHeight = resources.getDimensionPixelOffset(R.dimen.addondetail_poster_heigth);\n-            mediaPoster.setVisibility(View.VISIBLE);\n-            UIUtils.loadImageIntoImageview(hostManager,\n-                    addonDetails.thumbnail,\n-                    mediaPoster, posterWidth, posterHeight);\n-            UIUtils.loadImageIntoImageview(hostManager,\n-                    addonDetails.fanart,\n-                    mediaArt, artWidth, artHeight);\n-        } else {\n-            // No fanart, just present the poster\n-            mediaPoster.setVisibility(View.GONE);\n-            UIUtils.loadImageIntoImageview(hostManager,\n-                    addonDetails.thumbnail,\n-                    mediaArt, artWidth, artHeight);\n-            // Reset padding\n-            int paddingLeft = mediaTitle.getPaddingRight(),\n-                    paddingRight = mediaTitle.getPaddingRight(),\n-                    paddingTop = mediaTitle.getPaddingTop(),\n-                    paddingBottom = mediaTitle.getPaddingBottom();\n-            mediaTitle.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom);\n-            mediaUndertitle.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom);\n-        }\n+        int posterWidth = resources.getDimensionPixelOffset(R.dimen.addondetail_poster_width);\n+        int posterHeight = resources.getDimensionPixelOffset(R.dimen.addondetail_poster_height);\n+\n+        UIUtils.loadImageIntoImageview(hostManager,\n+                                       TextUtils.isEmpty(fanart)? poster : fanart,\n+                                       mediaArt, artWidth, artHeight);\n+        UIUtils.loadImageIntoImageview(hostManager,\n+                                       poster,\n+                                       mediaPoster, posterWidth, posterHeight);\n \n-        setupEnableButton(addonDetails.enabled);","path":"app/src/main/java/org/xbmc/kore/ui/AddonDetailsFragment.java","position":196,"original_position":196,"commit_id":"b0b343973dc884d8e06249ad4a83e0d78d9591f3","original_commit_id":"b0b343973dc884d8e06249ad4a83e0d78d9591f3","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},"body":"You can't remove this call. It is used to show if the addon is enabled or not when the user enters the screen, so it is needed.","created_at":"2015-12-15T19:04:52Z","updated_at":"2015-12-15T19:04:52Z","html_url":"https://github.com/xbmc/Kore/pull/153#discussion_r47682021","pull_request_url":"https://api.github.com/repos/xbmc/Kore/pulls/153","_links":{"self":{"href":"https://api.github.com/repos/xbmc/Kore/pulls/comments/47682021"},"html":{"href":"https://github.com/xbmc/Kore/pull/153#discussion_r47682021"},"pull_request":{"href":"https://api.github.com/repos/xbmc/Kore/pulls/153"}}},"pull_request":{"url":"https://api.github.com/repos/xbmc/Kore/pulls/153","id":53535316,"html_url":"https://github.com/xbmc/Kore/pull/153","diff_url":"https://github.com/xbmc/Kore/pull/153.diff","patch_url":"https://github.com/xbmc/Kore/pull/153.patch","issue_url":"https://api.github.com/repos/xbmc/Kore/issues/153","number":153,"state":"open","locked":false,"title":"Implemented shared element transitions for addons","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},"body":"Removed getting details in AddonDetailsFragment as the\r\nAddonListFragment already provides all information required\r\nin the AddonDetailsFragment. Therefore, we do not need to\r\nretrieve the same information in the AddonDetailsFragment as well.","created_at":"2015-12-14T08:19:02Z","updated_at":"2015-12-15T19:04:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36500954a83adcae1aa8d49b0fbef59523528b22","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xbmc/Kore/pulls/153/commits","review_comments_url":"https://api.github.com/repos/xbmc/Kore/pulls/153/comments","review_comment_url":"https://api.github.com/repos/xbmc/Kore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xbmc/Kore/issues/153/comments","statuses_url":"https://api.github.com/repos/xbmc/Kore/statuses/b0b343973dc884d8e06249ad4a83e0d78d9591f3","head":{"label":"poisdeux:sharedelementtransition_addons","ref":"sharedelementtransition_addons","sha":"b0b343973dc884d8e06249ad4a83e0d78d9591f3","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},"repo":{"id":39832138,"name":"Kore","full_name":"poisdeux/Kore","owner":{"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},"private":false,"html_url":"https://github.com/poisdeux/Kore","description":"Kore is a simple and easy-to-use Kodi remote.","fork":true,"url":"https://api.github.com/repos/poisdeux/Kore","forks_url":"https://api.github.com/repos/poisdeux/Kore/forks","keys_url":"https://api.github.com/repos/poisdeux/Kore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/poisdeux/Kore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/poisdeux/Kore/teams","hooks_url":"https://api.github.com/repos/poisdeux/Kore/hooks","issue_events_url":"https://api.github.com/repos/poisdeux/Kore/issues/events{/number}","events_url":"https://api.github.com/repos/poisdeux/Kore/events","assignees_url":"https://api.github.com/repos/poisdeux/Kore/assignees{/user}","branches_url":"https://api.github.com/repos/poisdeux/Kore/branches{/branch}","tags_url":"https://api.github.com/repos/poisdeux/Kore/tags","blobs_url":"https://api.github.com/repos/poisdeux/Kore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/poisdeux/Kore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/poisdeux/Kore/git/refs{/sha}","trees_url":"https://api.github.com/repos/poisdeux/Kore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/poisdeux/Kore/statuses/{sha}","languages_url":"https://api.github.com/repos/poisdeux/Kore/languages","stargazers_url":"https://api.github.com/repos/poisdeux/Kore/stargazers","contributors_url":"https://api.github.com/repos/poisdeux/Kore/contributors","subscribers_url":"https://api.github.com/repos/poisdeux/Kore/subscribers","subscription_url":"https://api.github.com/repos/poisdeux/Kore/subscription","commits_url":"https://api.github.com/repos/poisdeux/Kore/commits{/sha}","git_commits_url":"https://api.github.com/repos/poisdeux/Kore/git/commits{/sha}","comments_url":"https://api.github.com/repos/poisdeux/Kore/comments{/number}","issue_comment_url":"https://api.github.com/repos/poisdeux/Kore/issues/comments{/number}","contents_url":"https://api.github.com/repos/poisdeux/Kore/contents/{+path}","compare_url":"https://api.github.com/repos/poisdeux/Kore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/poisdeux/Kore/merges","archive_url":"https://api.github.com/repos/poisdeux/Kore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/poisdeux/Kore/downloads","issues_url":"https://api.github.com/repos/poisdeux/Kore/issues{/number}","pulls_url":"https://api.github.com/repos/poisdeux/Kore/pulls{/number}","milestones_url":"https://api.github.com/repos/poisdeux/Kore/milestones{/number}","notifications_url":"https://api.github.com/repos/poisdeux/Kore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/poisdeux/Kore/labels{/name}","releases_url":"https://api.github.com/repos/poisdeux/Kore/releases{/id}","created_at":"2015-07-28T12:16:59Z","updated_at":"2015-07-28T12:17:00Z","pushed_at":"2015-12-15T16:01:14Z","git_url":"git://github.com/poisdeux/Kore.git","ssh_url":"git@github.com:poisdeux/Kore.git","clone_url":"https://github.com/poisdeux/Kore.git","svn_url":"https://github.com/poisdeux/Kore","homepage":null,"size":30330,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xbmc:master","ref":"master","sha":"32171ebfbafe3d44f987df6eb235762d262f1fa7","user":{"login":"xbmc","id":199122,"avatar_url":"https://avatars.githubusercontent.com/u/199122?v=3","gravatar_id":"","url":"https://api.github.com/users/xbmc","html_url":"https://github.com/xbmc","followers_url":"https://api.github.com/users/xbmc/followers","following_url":"https://api.github.com/users/xbmc/following{/other_user}","gists_url":"https://api.github.com/users/xbmc/gists{/gist_id}","starred_url":"https://api.github.com/users/xbmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbmc/subscriptions","organizations_url":"https://api.github.com/users/xbmc/orgs","repos_url":"https://api.github.com/users/xbmc/repos","events_url":"https://api.github.com/users/xbmc/events{/privacy}","received_events_url":"https://api.github.com/users/xbmc/received_events","type":"Organization","site_admin":false},"repo":{"id":29241103,"name":"Kore","full_name":"xbmc/Kore","owner":{"login":"xbmc","id":199122,"avatar_url":"https://avatars.githubusercontent.com/u/199122?v=3","gravatar_id":"","url":"https://api.github.com/users/xbmc","html_url":"https://github.com/xbmc","followers_url":"https://api.github.com/users/xbmc/followers","following_url":"https://api.github.com/users/xbmc/following{/other_user}","gists_url":"https://api.github.com/users/xbmc/gists{/gist_id}","starred_url":"https://api.github.com/users/xbmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbmc/subscriptions","organizations_url":"https://api.github.com/users/xbmc/orgs","repos_url":"https://api.github.com/users/xbmc/repos","events_url":"https://api.github.com/users/xbmc/events{/privacy}","received_events_url":"https://api.github.com/users/xbmc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xbmc/Kore","description":"Kore is a simple and easy-to-use Kodi remote.","fork":false,"url":"https://api.github.com/repos/xbmc/Kore","forks_url":"https://api.github.com/repos/xbmc/Kore/forks","keys_url":"https://api.github.com/repos/xbmc/Kore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xbmc/Kore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xbmc/Kore/teams","hooks_url":"https://api.github.com/repos/xbmc/Kore/hooks","issue_events_url":"https://api.github.com/repos/xbmc/Kore/issues/events{/number}","events_url":"https://api.github.com/repos/xbmc/Kore/events","assignees_url":"https://api.github.com/repos/xbmc/Kore/assignees{/user}","branches_url":"https://api.github.com/repos/xbmc/Kore/branches{/branch}","tags_url":"https://api.github.com/repos/xbmc/Kore/tags","blobs_url":"https://api.github.com/repos/xbmc/Kore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xbmc/Kore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xbmc/Kore/git/refs{/sha}","trees_url":"https://api.github.com/repos/xbmc/Kore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xbmc/Kore/statuses/{sha}","languages_url":"https://api.github.com/repos/xbmc/Kore/languages","stargazers_url":"https://api.github.com/repos/xbmc/Kore/stargazers","contributors_url":"https://api.github.com/repos/xbmc/Kore/contributors","subscribers_url":"https://api.github.com/repos/xbmc/Kore/subscribers","subscription_url":"https://api.github.com/repos/xbmc/Kore/subscription","commits_url":"https://api.github.com/repos/xbmc/Kore/commits{/sha}","git_commits_url":"https://api.github.com/repos/xbmc/Kore/git/commits{/sha}","comments_url":"https://api.github.com/repos/xbmc/Kore/comments{/number}","issue_comment_url":"https://api.github.com/repos/xbmc/Kore/issues/comments{/number}","contents_url":"https://api.github.com/repos/xbmc/Kore/contents/{+path}","compare_url":"https://api.github.com/repos/xbmc/Kore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xbmc/Kore/merges","archive_url":"https://api.github.com/repos/xbmc/Kore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xbmc/Kore/downloads","issues_url":"https://api.github.com/repos/xbmc/Kore/issues{/number}","pulls_url":"https://api.github.com/repos/xbmc/Kore/pulls{/number}","milestones_url":"https://api.github.com/repos/xbmc/Kore/milestones{/number}","notifications_url":"https://api.github.com/repos/xbmc/Kore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xbmc/Kore/labels{/name}","releases_url":"https://api.github.com/repos/xbmc/Kore/releases{/id}","created_at":"2015-01-14T11:26:04Z","updated_at":"2015-12-13T15:34:16Z","pushed_at":"2015-12-15T16:06:50Z","git_url":"git://github.com/xbmc/Kore.git","ssh_url":"git@github.com:xbmc/Kore.git","clone_url":"https://github.com/xbmc/Kore.git","svn_url":"https://github.com/xbmc/Kore","homepage":null,"size":32248,"stargazers_count":115,"watchers_count":115,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"open_issues_count":42,"forks":71,"open_issues":42,"watchers":115,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xbmc/Kore/pulls/153"},"html":{"href":"https://github.com/xbmc/Kore/pull/153"},"issue":{"href":"https://api.github.com/repos/xbmc/Kore/issues/153"},"comments":{"href":"https://api.github.com/repos/xbmc/Kore/issues/153/comments"},"review_comments":{"href":"https://api.github.com/repos/xbmc/Kore/pulls/153/comments"},"review_comment":{"href":"https://api.github.com/repos/xbmc/Kore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xbmc/Kore/pulls/153/commits"},"statuses":{"href":"https://api.github.com/repos/xbmc/Kore/statuses/b0b343973dc884d8e06249ad4a83e0d78d9591f3"}}}}