GitHub PullRequestReviewCommentEvent at 2014-09-10 14:21:23
Repository: somethingfishy
Actor: ataulm
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/novoda/somethingfishy/pulls/comments/17363329","id":17363329,"diff_hunk":"@@ -0,0 +1,172 @@\n+package com.novoda.esa.navigation;\n+\n+import android.os.Bundle;\n+import android.support.v4.app.ActionBarDrawerToggle;\n+import android.support.v4.app.NavUtils;\n+import android.support.v4.widget.DrawerLayout;\n+import android.view.Gravity;\n+import android.view.MenuItem;\n+import android.view.View;\n+import android.widget.AbsListView;\n+import android.widget.AdapterView;\n+import android.widget.ListView;\n+\n+import com.novoda.esa.KodiakActivity;\n+import com.novoda.esa.R;\n+import com.novoda.notils.caster.Views;\n+import com.novoda.notils.exception.DeveloperError;\n+\n+import static com.novoda.esa.navigation.NavDrawerItem.indexOf;\n+\n+public abstract class KodiakNavDrawerActivity extends KodiakActivity {\n+\n+    private DrawerLayout drawer;\n+    private DrawerLayout.DrawerListener drawerListener;\n+    private NavDrawerAdapter adapter;\n+    private ListView drawerList;\n+\n+    @Override\n+    protected void onCreate(Bundle savedInstanceState) {\n+        super.onCreate(savedInstanceState);\n+        adapter = new NavDrawerAdapter(getResources());\n+    }\n+\n+    @Override\n+    public void setContentView(int layoutResID) {\n+        super.setContentView(layoutResID);\n+        drawer = Views.findById(this, R.id.navigation_drawer);\n+        if (drawer == null) {\n+            throw new DeveloperError(\"Activities extending \" + KodiakNavDrawerActivity.class.getSimpleName() + \" must\" +\n+                    \"contain a DrawerLayout with id: R.id.navigation_drawer\");\n+        }\n+        drawerList = Views.findById(this, R.id.drawer_list);\n+        if (drawerList == null) {\n+            throw new DeveloperError(\"Activities extending \" + KodiakNavDrawerActivity.class.getSimpleName() + \" must\" +\n+                    \"contain a ListView with id: R.id.drawer_list\");\n+        }\n+\n+        drawerList.setAdapter(adapter);\n+        drawerList.setChoiceMode(AbsListView.CHOICE_MODE_SINGLE);\n+\n+        drawerList.setOnItemClickListener(new ListView.OnItemClickListener() {\n+\n+            @Override\n+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n+                final NavDrawerItem item = adapter.getItem(position - getNavigationDrawerHeaderViewsCount());\n+                onNavigationDrawerItemClick(item);\n+            }\n+\n+        });\n+\n+        addDrawerOpenCloseListener();\n+        setCheckedItemFromVisibleScreen();\n+    }\n+\n+    private void setCheckedItemFromVisibleScreen() {\n+        int position = indexOf(getSelfAsNavDrawerItem());","path":"app/src/main/java/com/novoda/esa/navigation/KodiakNavDrawerActivity.java","position":66,"original_position":66,"commit_id":"7ddf6cf0fedafaa4a2fcd79941452fdc04c49cd0","original_commit_id":"7ddf6cf0fedafaa4a2fcd79941452fdc04c49cd0","user":{"login":"ataulm","id":2678555,"avatar_url":"https://avatars.githubusercontent.com/u/2678555?v=2","gravatar_id":"0aeb1b4466d10ea1b0a5de12a740918f","url":"https://api.github.com/users/ataulm","html_url":"https://github.com/ataulm","followers_url":"https://api.github.com/users/ataulm/followers","following_url":"https://api.github.com/users/ataulm/following{/other_user}","gists_url":"https://api.github.com/users/ataulm/gists{/gist_id}","starred_url":"https://api.github.com/users/ataulm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ataulm/subscriptions","organizations_url":"https://api.github.com/users/ataulm/orgs","repos_url":"https://api.github.com/users/ataulm/repos","events_url":"https://api.github.com/users/ataulm/events{/privacy}","received_events_url":"https://api.github.com/users/ataulm/received_events","type":"User","site_admin":false},"body":"here's the use of that abstract method from before in the Activities with NavDrawer","created_at":"2014-09-10T14:21:23Z","updated_at":"2014-09-10T14:21:23Z","html_url":"https://github.com/novoda/somethingfishy/pull/3#discussion_r17363329","pull_request_url":"https://api.github.com/repos/novoda/somethingfishy/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/novoda/somethingfishy/pulls/comments/17363329"},"html":{"href":"https://github.com/novoda/somethingfishy/pull/3#discussion_r17363329"},"pull_request":{"href":"https://api.github.com/repos/novoda/somethingfishy/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/novoda/somethingfishy/pulls/3","id":21023368,"html_url":"https://github.com/novoda/somethingfishy/pull/3","diff_url":"https://github.com/novoda/somethingfishy/pull/3.diff","patch_url":"https://github.com/novoda/somethingfishy/pull/3.patch","issue_url":"https://api.github.com/repos/novoda/somethingfishy/issues/3","number":3,"state":"open","locked":false,"title":"Add navigation drawer to unify screens","user":{"login":"ataulm","id":2678555,"avatar_url":"https://avatars.githubusercontent.com/u/2678555?v=2","gravatar_id":"0aeb1b4466d10ea1b0a5de12a740918f","url":"https://api.github.com/users/ataulm","html_url":"https://github.com/ataulm","followers_url":"https://api.github.com/users/ataulm/followers","following_url":"https://api.github.com/users/ataulm/following{/other_user}","gists_url":"https://api.github.com/users/ataulm/gists{/gist_id}","starred_url":"https://api.github.com/users/ataulm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ataulm/subscriptions","organizations_url":"https://api.github.com/users/ataulm/orgs","repos_url":"https://api.github.com/users/ataulm/repos","events_url":"https://api.github.com/users/ataulm/events{/privacy}","received_events_url":"https://api.github.com/users/ataulm/received_events","type":"User","site_admin":false},"body":"Adds navigation drawer.\r\n\r\nThe ReportIce screen is just an empty layout, I just wanted to test the Navigator and NavDrawer selection states.\r\n\r\n![nav](https://cloud.githubusercontent.com/assets/2678555/4218804/d5289ec8-38f4-11e4-9840-e5defcd968c7.png)\r\n","created_at":"2014-09-10T14:15:57Z","updated_at":"2014-09-10T14:21:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d32c720bbd625eaa16954819a09ac4c673116592","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/novoda/somethingfishy/pulls/3/commits","review_comments_url":"https://api.github.com/repos/novoda/somethingfishy/pulls/3/comments","review_comment_url":"https://api.github.com/repos/novoda/somethingfishy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/novoda/somethingfishy/issues/3/comments","statuses_url":"https://api.github.com/repos/novoda/somethingfishy/statuses/7ddf6cf0fedafaa4a2fcd79941452fdc04c49cd0","head":{"label":"novoda:nav_drawer_in_forecast","ref":"nav_drawer_in_forecast","sha":"7ddf6cf0fedafaa4a2fcd79941452fdc04c49cd0","user":{"login":"novoda","id":74874,"avatar_url":"https://avatars.githubusercontent.com/u/74874?v=2","gravatar_id":"104b9579fb9d4f683d7bea2722bc5940","url":"https://api.github.com/users/novoda","html_url":"https://github.com/novoda","followers_url":"https://api.github.com/users/novoda/followers","following_url":"https://api.github.com/users/novoda/following{/other_user}","gists_url":"https://api.github.com/users/novoda/gists{/gist_id}","starred_url":"https://api.github.com/users/novoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novoda/subscriptions","organizations_url":"https://api.github.com/users/novoda/orgs","repos_url":"https://api.github.com/users/novoda/repos","events_url":"https://api.github.com/users/novoda/events{/privacy}","received_events_url":"https://api.github.com/users/novoda/received_events","type":"Organization","site_admin":false},"repo":{"id":23810031,"name":"somethingfishy","full_name":"novoda/somethingfishy","owner":{"login":"novoda","id":74874,"avatar_url":"https://avatars.githubusercontent.com/u/74874?v=2","gravatar_id":"104b9579fb9d4f683d7bea2722bc5940","url":"https://api.github.com/users/novoda","html_url":"https://github.com/novoda","followers_url":"https://api.github.com/users/novoda/followers","following_url":"https://api.github.com/users/novoda/following{/other_user}","gists_url":"https://api.github.com/users/novoda/gists{/gist_id}","starred_url":"https://api.github.com/users/novoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novoda/subscriptions","organizations_url":"https://api.github.com/users/novoda/orgs","repos_url":"https://api.github.com/users/novoda/repos","events_url":"https://api.github.com/users/novoda/events{/privacy}","received_events_url":"https://api.github.com/users/novoda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/novoda/somethingfishy","description":"ESA App Camp 2014","fork":false,"url":"https://api.github.com/repos/novoda/somethingfishy","forks_url":"https://api.github.com/repos/novoda/somethingfishy/forks","keys_url":"https://api.github.com/repos/novoda/somethingfishy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/novoda/somethingfishy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/novoda/somethingfishy/teams","hooks_url":"https://api.github.com/repos/novoda/somethingfishy/hooks","issue_events_url":"https://api.github.com/repos/novoda/somethingfishy/issues/events{/number}","events_url":"https://api.github.com/repos/novoda/somethingfishy/events","assignees_url":"https://api.github.com/repos/novoda/somethingfishy/assignees{/user}","branches_url":"https://api.github.com/repos/novoda/somethingfishy/branches{/branch}","tags_url":"https://api.github.com/repos/novoda/somethingfishy/tags","blobs_url":"https://api.github.com/repos/novoda/somethingfishy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/novoda/somethingfishy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/novoda/somethingfishy/git/refs{/sha}","trees_url":"https://api.github.com/repos/novoda/somethingfishy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/novoda/somethingfishy/statuses/{sha}","languages_url":"https://api.github.com/repos/novoda/somethingfishy/languages","stargazers_url":"https://api.github.com/repos/novoda/somethingfishy/stargazers","contributors_url":"https://api.github.com/repos/novoda/somethingfishy/contributors","subscribers_url":"https://api.github.com/repos/novoda/somethingfishy/subscribers","subscription_url":"https://api.github.com/repos/novoda/somethingfishy/subscription","commits_url":"https://api.github.com/repos/novoda/somethingfishy/commits{/sha}","git_commits_url":"https://api.github.com/repos/novoda/somethingfishy/git/commits{/sha}","comments_url":"https://api.github.com/repos/novoda/somethingfishy/comments{/number}","issue_comment_url":"https://api.github.com/repos/novoda/somethingfishy/issues/comments/{number}","contents_url":"https://api.github.com/repos/novoda/somethingfishy/contents/{+path}","compare_url":"https://api.github.com/repos/novoda/somethingfishy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/novoda/somethingfishy/merges","archive_url":"https://api.github.com/repos/novoda/somethingfishy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/novoda/somethingfishy/downloads","issues_url":"https://api.github.com/repos/novoda/somethingfishy/issues{/number}","pulls_url":"https://api.github.com/repos/novoda/somethingfishy/pulls{/number}","milestones_url":"https://api.github.com/repos/novoda/somethingfishy/milestones{/number}","notifications_url":"https://api.github.com/repos/novoda/somethingfishy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/novoda/somethingfishy/labels{/name}","releases_url":"https://api.github.com/repos/novoda/somethingfishy/releases{/id}","created_at":"2014-09-08T21:59:53Z","updated_at":"2014-09-09T08:22:48Z","pushed_at":"2014-09-10T14:20:36Z","git_url":"git://github.com/novoda/somethingfishy.git","ssh_url":"git@github.com:novoda/somethingfishy.git","clone_url":"https://github.com/novoda/somethingfishy.git","svn_url":"https://github.com/novoda/somethingfishy","homepage":"www.twitter.com/novoda","size":0,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"novoda:master","ref":"master","sha":"8c79e7caef0835d6118fa7f6fa89007965e29345","user":{"login":"novoda","id":74874,"avatar_url":"https://avatars.githubusercontent.com/u/74874?v=2","gravatar_id":"104b9579fb9d4f683d7bea2722bc5940","url":"https://api.github.com/users/novoda","html_url":"https://github.com/novoda","followers_url":"https://api.github.com/users/novoda/followers","following_url":"https://api.github.com/users/novoda/following{/other_user}","gists_url":"https://api.github.com/users/novoda/gists{/gist_id}","starred_url":"https://api.github.com/users/novoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novoda/subscriptions","organizations_url":"https://api.github.com/users/novoda/orgs","repos_url":"https://api.github.com/users/novoda/repos","events_url":"https://api.github.com/users/novoda/events{/privacy}","received_events_url":"https://api.github.com/users/novoda/received_events","type":"Organization","site_admin":false},"repo":{"id":23810031,"name":"somethingfishy","full_name":"novoda/somethingfishy","owner":{"login":"novoda","id":74874,"avatar_url":"https://avatars.githubusercontent.com/u/74874?v=2","gravatar_id":"104b9579fb9d4f683d7bea2722bc5940","url":"https://api.github.com/users/novoda","html_url":"https://github.com/novoda","followers_url":"https://api.github.com/users/novoda/followers","following_url":"https://api.github.com/users/novoda/following{/other_user}","gists_url":"https://api.github.com/users/novoda/gists{/gist_id}","starred_url":"https://api.github.com/users/novoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novoda/subscriptions","organizations_url":"https://api.github.com/users/novoda/orgs","repos_url":"https://api.github.com/users/novoda/repos","events_url":"https://api.github.com/users/novoda/events{/privacy}","received_events_url":"https://api.github.com/users/novoda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/novoda/somethingfishy","description":"ESA App Camp 2014","fork":false,"url":"https://api.github.com/repos/novoda/somethingfishy","forks_url":"https://api.github.com/repos/novoda/somethingfishy/forks","keys_url":"https://api.github.com/repos/novoda/somethingfishy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/novoda/somethingfishy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/novoda/somethingfishy/teams","hooks_url":"https://api.github.com/repos/novoda/somethingfishy/hooks","issue_events_url":"https://api.github.com/repos/novoda/somethingfishy/issues/events{/number}","events_url":"https://api.github.com/repos/novoda/somethingfishy/events","assignees_url":"https://api.github.com/repos/novoda/somethingfishy/assignees{/user}","branches_url":"https://api.github.com/repos/novoda/somethingfishy/branches{/branch}","tags_url":"https://api.github.com/repos/novoda/somethingfishy/tags","blobs_url":"https://api.github.com/repos/novoda/somethingfishy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/novoda/somethingfishy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/novoda/somethingfishy/git/refs{/sha}","trees_url":"https://api.github.com/repos/novoda/somethingfishy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/novoda/somethingfishy/statuses/{sha}","languages_url":"https://api.github.com/repos/novoda/somethingfishy/languages","stargazers_url":"https://api.github.com/repos/novoda/somethingfishy/stargazers","contributors_url":"https://api.github.com/repos/novoda/somethingfishy/contributors","subscribers_url":"https://api.github.com/repos/novoda/somethingfishy/subscribers","subscription_url":"https://api.github.com/repos/novoda/somethingfishy/subscription","commits_url":"https://api.github.com/repos/novoda/somethingfishy/commits{/sha}","git_commits_url":"https://api.github.com/repos/novoda/somethingfishy/git/commits{/sha}","comments_url":"https://api.github.com/repos/novoda/somethingfishy/comments{/number}","issue_comment_url":"https://api.github.com/repos/novoda/somethingfishy/issues/comments/{number}","contents_url":"https://api.github.com/repos/novoda/somethingfishy/contents/{+path}","compare_url":"https://api.github.com/repos/novoda/somethingfishy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/novoda/somethingfishy/merges","archive_url":"https://api.github.com/repos/novoda/somethingfishy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/novoda/somethingfishy/downloads","issues_url":"https://api.github.com/repos/novoda/somethingfishy/issues{/number}","pulls_url":"https://api.github.com/repos/novoda/somethingfishy/pulls{/number}","milestones_url":"https://api.github.com/repos/novoda/somethingfishy/milestones{/number}","notifications_url":"https://api.github.com/repos/novoda/somethingfishy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/novoda/somethingfishy/labels{/name}","releases_url":"https://api.github.com/repos/novoda/somethingfishy/releases{/id}","created_at":"2014-09-08T21:59:53Z","updated_at":"2014-09-09T08:22:48Z","pushed_at":"2014-09-10T14:20:36Z","git_url":"git://github.com/novoda/somethingfishy.git","ssh_url":"git@github.com:novoda/somethingfishy.git","clone_url":"https://github.com/novoda/somethingfishy.git","svn_url":"https://github.com/novoda/somethingfishy","homepage":"www.twitter.com/novoda","size":0,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/novoda/somethingfishy/pulls/3"},"html":{"href":"https://github.com/novoda/somethingfishy/pull/3"},"issue":{"href":"https://api.github.com/repos/novoda/somethingfishy/issues/3"},"comments":{"href":"https://api.github.com/repos/novoda/somethingfishy/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/novoda/somethingfishy/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/novoda/somethingfishy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/novoda/somethingfishy/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/novoda/somethingfishy/statuses/7ddf6cf0fedafaa4a2fcd79941452fdc04c49cd0"}}}}