{"action":"created","comment":{"url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/pulls/comments/92920955","pull_request_review_id":13445254,"id":92920955,"diff_hunk":"@@ -0,0 +1,86 @@\n+/*\n+ * Copyright 2016 SchedJoules\n+ *\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package com.schedjoules.eventdiscovery.eventlist.view;\n+\n+import android.content.res.Resources;\n+import android.support.v4.app.FragmentActivity;\n+import android.support.v7.widget.Toolbar;\n+import android.view.View;\n+\n+import com.schedjoules.eventdiscovery.R;\n+import com.schedjoules.eventdiscovery.common.BaseActivity;\n+\n+\n+/**\n+ * The toolbar of the Event list screen.\n+ *\n+ * @author Gabor Keszthelyi\n+ */\n+public final class EventListToolbar\n+{\n+    private final Toolbar mToolbar;\n+    private final Listener mListener;\n+\n+\n+    public EventListToolbar(Toolbar toolbar, Listener listener)\n+    {\n+        mToolbar = toolbar;\n+        mListener = listener;\n+    }\n+\n+\n+    public void initToolbar(FragmentActivity fragmentActivity)","path":"eventdiscovery-sdk/src/main/java/com/schedjoules/eventdiscovery/eventlist/view/EventListToolbar.java","position":47,"original_position":47,"commit_id":"1c6b5ede6d32258022a7335e8a6f4c00ceba4a26","original_commit_id":"1c6b5ede6d32258022a7335e8a6f4c00ceba4a26","user":{"login":"dmfs","id":1614987,"avatar_url":"https://avatars.githubusercontent.com/u/1614987?v=3","gravatar_id":"","url":"https://api.github.com/users/dmfs","html_url":"https://github.com/dmfs","followers_url":"https://api.github.com/users/dmfs/followers","following_url":"https://api.github.com/users/dmfs/following{/other_user}","gists_url":"https://api.github.com/users/dmfs/gists{/gist_id}","starred_url":"https://api.github.com/users/dmfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmfs/subscriptions","organizations_url":"https://api.github.com/users/dmfs/orgs","repos_url":"https://api.github.com/users/dmfs/repos","events_url":"https://api.github.com/users/dmfs/events{/privacy}","received_events_url":"https://api.github.com/users/dmfs/received_events","type":"User","site_admin":false},"body":"Which interface does this implement?","created_at":"2016-12-17T12:24:11Z","updated_at":"2016-12-17T12:38:19Z","html_url":"https://github.com/schedjoules/android-event-discovery-sdk/pull/36#discussion_r92920955","pull_request_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/pulls/comments/92920955"},"html":{"href":"https://github.com/schedjoules/android-event-discovery-sdk/pull/36#discussion_r92920955"},"pull_request":{"href":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/pulls/36","id":98179123,"html_url":"https://github.com/schedjoules/android-event-discovery-sdk/pull/36","diff_url":"https://github.com/schedjoules/android-event-discovery-sdk/pull/36.diff","patch_url":"https://github.com/schedjoules/android-event-discovery-sdk/pull/36.patch","issue_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/issues/36","number":36,"state":"open","locked":false,"title":"PR for 24 - Refactor EventListActivity into Fragment","user":{"login":"lemonboston","id":1077972,"avatar_url":"https://avatars.githubusercontent.com/u/1077972?v=3","gravatar_id":"","url":"https://api.github.com/users/lemonboston","html_url":"https://github.com/lemonboston","followers_url":"https://api.github.com/users/lemonboston/followers","following_url":"https://api.github.com/users/lemonboston/following{/other_user}","gists_url":"https://api.github.com/users/lemonboston/gists{/gist_id}","starred_url":"https://api.github.com/users/lemonboston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemonboston/subscriptions","organizations_url":"https://api.github.com/users/lemonboston/orgs","repos_url":"https://api.github.com/users/lemonboston/repos","events_url":"https://api.github.com/users/lemonboston/events{/privacy}","received_events_url":"https://api.github.com/users/lemonboston/received_events","type":"User","site_admin":false},"body":"#24 \r\n\r\n@dmfs please review.\r\n\r\nOne issue come up with Glide, it's probably not important:\r\nGlide loading can be initiated with Glide.with(context), Glide.with(activity) or Glide.with(fragment), and it uses the given component to pause and restart loading on lifecycle callbacks. So far we used Glide.with(context) that actually delegated to Glide.with(activity), but after the refactor, there was a crash on rotation saying that the activity is destroyed already. We should pass in the fragment, but that's not obvious how to access it there (EventItemView). So I use application context now, which means pause, restart on lifecyles won't happen, but I think it's fine. Let me know if you see any problem with it.\r\n(Glide wiki mentions GIFs as a use case for the pausing, in which case it's clearly useful, but for our small thumbnails, I guess it's fine if they load possibly 'in vain' if the screen is recreated or left.)","created_at":"2016-12-15T16:05:07Z","updated_at":"2016-12-17T12:38:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eba799e3e62c3bc503612f2afdb2eb3fd2fbb948","assignee":{"login":"lemonboston","id":1077972,"avatar_url":"https://avatars.githubusercontent.com/u/1077972?v=3","gravatar_id":"","url":"https://api.github.com/users/lemonboston","html_url":"https://github.com/lemonboston","followers_url":"https://api.github.com/users/lemonboston/followers","following_url":"https://api.github.com/users/lemonboston/following{/other_user}","gists_url":"https://api.github.com/users/lemonboston/gists{/gist_id}","starred_url":"https://api.github.com/users/lemonboston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemonboston/subscriptions","organizations_url":"https://api.github.com/users/lemonboston/orgs","repos_url":"https://api.github.com/users/lemonboston/repos","events_url":"https://api.github.com/users/lemonboston/events{/privacy}","received_events_url":"https://api.github.com/users/lemonboston/received_events","type":"User","site_admin":false},"assignees":[{"login":"lemonboston","id":1077972,"avatar_url":"https://avatars.githubusercontent.com/u/1077972?v=3","gravatar_id":"","url":"https://api.github.com/users/lemonboston","html_url":"https://github.com/lemonboston","followers_url":"https://api.github.com/users/lemonboston/followers","following_url":"https://api.github.com/users/lemonboston/following{/other_user}","gists_url":"https://api.github.com/users/lemonboston/gists{/gist_id}","starred_url":"https://api.github.com/users/lemonboston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemonboston/subscriptions","organizations_url":"https://api.github.com/users/lemonboston/orgs","repos_url":"https://api.github.com/users/lemonboston/repos","events_url":"https://api.github.com/users/lemonboston/events{/privacy}","received_events_url":"https://api.github.com/users/lemonboston/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/pulls/36/commits","review_comments_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/pulls/36/comments","review_comment_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/issues/36/comments","statuses_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/statuses/1c6b5ede6d32258022a7335e8a6f4c00ceba4a26","head":{"label":"schedjoules:bugs/24-activity-leak-move-to-fragment","ref":"bugs/24-activity-leak-move-to-fragment","sha":"1c6b5ede6d32258022a7335e8a6f4c00ceba4a26","user":{"login":"schedjoules","id":5942841,"avatar_url":"https://avatars.githubusercontent.com/u/5942841?v=3","gravatar_id":"","url":"https://api.github.com/users/schedjoules","html_url":"https://github.com/schedjoules","followers_url":"https://api.github.com/users/schedjoules/followers","following_url":"https://api.github.com/users/schedjoules/following{/other_user}","gists_url":"https://api.github.com/users/schedjoules/gists{/gist_id}","starred_url":"https://api.github.com/users/schedjoules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schedjoules/subscriptions","organizations_url":"https://api.github.com/users/schedjoules/orgs","repos_url":"https://api.github.com/users/schedjoules/repos","events_url":"https://api.github.com/users/schedjoules/events{/privacy}","received_events_url":"https://api.github.com/users/schedjoules/received_events","type":"Organization","site_admin":false},"repo":{"id":75389351,"name":"android-event-discovery-sdk","full_name":"schedjoules/android-event-discovery-sdk","owner":{"login":"schedjoules","id":5942841,"avatar_url":"https://avatars.githubusercontent.com/u/5942841?v=3","gravatar_id":"","url":"https://api.github.com/users/schedjoules","html_url":"https://github.com/schedjoules","followers_url":"https://api.github.com/users/schedjoules/followers","following_url":"https://api.github.com/users/schedjoules/following{/other_user}","gists_url":"https://api.github.com/users/schedjoules/gists{/gist_id}","starred_url":"https://api.github.com/users/schedjoules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schedjoules/subscriptions","organizations_url":"https://api.github.com/users/schedjoules/orgs","repos_url":"https://api.github.com/users/schedjoules/repos","events_url":"https://api.github.com/users/schedjoules/events{/privacy}","received_events_url":"https://api.github.com/users/schedjoules/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/schedjoules/android-event-discovery-sdk","description":null,"fork":false,"url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk","forks_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/forks","keys_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/teams","hooks_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/hooks","issue_events_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/events","assignees_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/tags","blobs_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/languages","stargazers_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/stargazers","contributors_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/contributors","subscribers_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/subscribers","subscription_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/subscription","commits_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/merges","archive_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/downloads","issues_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/labels{/name}","releases_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/deployments","created_at":"2016-12-02T11:19:33Z","updated_at":"2016-12-02T11:20:20Z","pushed_at":"2016-12-16T18:48:34Z","git_url":"git://github.com/schedjoules/android-event-discovery-sdk.git","ssh_url":"git@github.com:schedjoules/android-event-discovery-sdk.git","clone_url":"https://github.com/schedjoules/android-event-discovery-sdk.git","svn_url":"https://github.com/schedjoules/android-event-discovery-sdk","homepage":null,"size":399,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":21,"forks":0,"open_issues":21,"watchers":0,"default_branch":"master"}},"base":{"label":"schedjoules:master","ref":"master","sha":"c7d663335f8b56c63928381e6c646c54479e47c1","user":{"login":"schedjoules","id":5942841,"avatar_url":"https://avatars.githubusercontent.com/u/5942841?v=3","gravatar_id":"","url":"https://api.github.com/users/schedjoules","html_url":"https://github.com/schedjoules","followers_url":"https://api.github.com/users/schedjoules/followers","following_url":"https://api.github.com/users/schedjoules/following{/other_user}","gists_url":"https://api.github.com/users/schedjoules/gists{/gist_id}","starred_url":"https://api.github.com/users/schedjoules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schedjoules/subscriptions","organizations_url":"https://api.github.com/users/schedjoules/orgs","repos_url":"https://api.github.com/users/schedjoules/repos","events_url":"https://api.github.com/users/schedjoules/events{/privacy}","received_events_url":"https://api.github.com/users/schedjoules/received_events","type":"Organization","site_admin":false},"repo":{"id":75389351,"name":"android-event-discovery-sdk","full_name":"schedjoules/android-event-discovery-sdk","owner":{"login":"schedjoules","id":5942841,"avatar_url":"https://avatars.githubusercontent.com/u/5942841?v=3","gravatar_id":"","url":"https://api.github.com/users/schedjoules","html_url":"https://github.com/schedjoules","followers_url":"https://api.github.com/users/schedjoules/followers","following_url":"https://api.github.com/users/schedjoules/following{/other_user}","gists_url":"https://api.github.com/users/schedjoules/gists{/gist_id}","starred_url":"https://api.github.com/users/schedjoules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schedjoules/subscriptions","organizations_url":"https://api.github.com/users/schedjoules/orgs","repos_url":"https://api.github.com/users/schedjoules/repos","events_url":"https://api.github.com/users/schedjoules/events{/privacy}","received_events_url":"https://api.github.com/users/schedjoules/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/schedjoules/android-event-discovery-sdk","description":null,"fork":false,"url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk","forks_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/forks","keys_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/teams","hooks_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/hooks","issue_events_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/events","assignees_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/tags","blobs_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/languages","stargazers_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/stargazers","contributors_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/contributors","subscribers_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/subscribers","subscription_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/subscription","commits_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/merges","archive_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/downloads","issues_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/labels{/name}","releases_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/deployments","created_at":"2016-12-02T11:19:33Z","updated_at":"2016-12-02T11:20:20Z","pushed_at":"2016-12-16T18:48:34Z","git_url":"git://github.com/schedjoules/android-event-discovery-sdk.git","ssh_url":"git@github.com:schedjoules/android-event-discovery-sdk.git","clone_url":"https://github.com/schedjoules/android-event-discovery-sdk.git","svn_url":"https://github.com/schedjoules/android-event-discovery-sdk","homepage":null,"size":399,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":21,"forks":0,"open_issues":21,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/pulls/36"},"html":{"href":"https://github.com/schedjoules/android-event-discovery-sdk/pull/36"},"issue":{"href":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/issues/36"},"comments":{"href":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/schedjoules/android-event-discovery-sdk/statuses/1c6b5ede6d32258022a7335e8a6f4c00ceba4a26"}}}}
{"actor":{"display_login":"dmfs"}}