{"action":"created","comment":{"url":"https://api.github.com/repos/sheaam30/CodeReview/pulls/comments/69381682","id":69381682,"diff_hunk":"@@ -0,0 +1,282 @@\n+package com.example.codereview.willowtree.activities;\n+\n+import android.content.Context;\n+import android.content.DialogInterface;\n+import android.content.Intent;\n+import android.content.res.Resources;\n+import android.content.res.TypedArray;\n+import android.net.ConnectivityManager;\n+import android.net.NetworkInfo;\n+import android.os.Build;\n+import android.os.Bundle;\n+import android.provider.Settings;\n+import android.support.v7.app.AlertDialog;\n+import android.support.v7.app.AppCompatActivity;\n+import android.support.v7.widget.LinearLayoutManager;\n+import android.support.v7.widget.RecyclerView;\n+import android.util.Log;\n+import android.view.View;\n+import android.widget.Button;\n+import android.widget.LinearLayout;\n+import android.widget.ProgressBar;\n+import android.widget.TextView;\n+\n+import com.android.volley.AuthFailureError;\n+import com.android.volley.NetworkError;\n+import com.android.volley.NoConnectionError;\n+import com.android.volley.ParseError;\n+import com.android.volley.Response;\n+import com.android.volley.ServerError;\n+import com.android.volley.TimeoutError;\n+import com.android.volley.VolleyError;\n+import com.example.codereview.willowtree.R;\n+import com.example.codereview.willowtree.dataModels.LaureateList;\n+import com.example.codereview.willowtree.network.ApiHandler;\n+import com.example.codereview.willowtree.network.GSONGetRequest;\n+import com.example.codereview.willowtree.util.LaureateListAdapter;\n+import com.example.codereview.willowtree.util.Singleton;\n+\n+import java.util.Random;\n+\n+public class NobelPrizeListActivity extends AppCompatActivity {\n+\n+    protected static final String TAG = NobelPrizeListActivity.class.getSimpleName();\n+\n+    private static Context staticContext;\n+\n+    private ProgressBar progressBar;\n+    private Button refreshButton;\n+    private LinearLayout errorView;\n+    private TextView jsonErrorTextView;\n+    private RecyclerView listRecyclerView;\n+    private LaureateListAdapter listAdapter;\n+\n+    @Override\n+    protected void onCreate(Bundle savedInstanceState)\n+    {\n+        super.onCreate(savedInstanceState);\n+        setContentView(R.layout.activity_noble_prize_list);\n+\n+        staticContext = this;\n+\n+        errorView = (LinearLayout) findViewById(R.id.error_linearLayout);\n+        progressBar = (ProgressBar) findViewById(R.id.loading_progressBar);\n+        refreshButton = (Button) findViewById(R.id.error_refresh_button);\n+        jsonErrorTextView = (TextView) findViewById(R.id.error_textView);\n+\n+        setProgressBarColor();\n+\n+        refreshButton.setOnClickListener(new View.OnClickListener() {\n+            @Override\n+            public void onClick(View v) {\n+                onStart();","path":"app/src/main/java/com/example/codereview/willowtree/activities/NobelPrizeListActivity.java","position":72,"original_position":72,"commit_id":"bd6188527c280816c9d44a59bf38fc3330218749","original_commit_id":"bd6188527c280816c9d44a59bf38fc3330218749","user":{"login":"sheaam30","id":6750107,"avatar_url":"https://avatars.githubusercontent.com/u/6750107?v=3","gravatar_id":"","url":"https://api.github.com/users/sheaam30","html_url":"https://github.com/sheaam30","followers_url":"https://api.github.com/users/sheaam30/followers","following_url":"https://api.github.com/users/sheaam30/following{/other_user}","gists_url":"https://api.github.com/users/sheaam30/gists{/gist_id}","starred_url":"https://api.github.com/users/sheaam30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheaam30/subscriptions","organizations_url":"https://api.github.com/users/sheaam30/orgs","repos_url":"https://api.github.com/users/sheaam30/repos","events_url":"https://api.github.com/users/sheaam30/events{/privacy}","received_events_url":"https://api.github.com/users/sheaam30/received_events","type":"User","site_admin":false},"body":"Calling Activity lifecycle functions are not a great thing to do. I suggest extracting the logic in `onStart` into a function and then calling that function directly.","created_at":"2016-07-02T19:15:53Z","updated_at":"2016-07-02T19:15:53Z","html_url":"https://github.com/sheaam30/CodeReview/pull/1#discussion_r69381682","pull_request_url":"https://api.github.com/repos/sheaam30/CodeReview/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/sheaam30/CodeReview/pulls/comments/69381682"},"html":{"href":"https://github.com/sheaam30/CodeReview/pull/1#discussion_r69381682"},"pull_request":{"href":"https://api.github.com/repos/sheaam30/CodeReview/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/sheaam30/CodeReview/pulls/1","id":76054944,"html_url":"https://github.com/sheaam30/CodeReview/pull/1","diff_url":"https://github.com/sheaam30/CodeReview/pull/1.diff","patch_url":"https://github.com/sheaam30/CodeReview/pull/1.patch","issue_url":"https://api.github.com/repos/sheaam30/CodeReview/issues/1","number":1,"state":"open","locked":false,"title":"- Code to be reviewed","user":{"login":"sheaam30","id":6750107,"avatar_url":"https://avatars.githubusercontent.com/u/6750107?v=3","gravatar_id":"","url":"https://api.github.com/users/sheaam30","html_url":"https://github.com/sheaam30","followers_url":"https://api.github.com/users/sheaam30/followers","following_url":"https://api.github.com/users/sheaam30/following{/other_user}","gists_url":"https://api.github.com/users/sheaam30/gists{/gist_id}","starred_url":"https://api.github.com/users/sheaam30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheaam30/subscriptions","organizations_url":"https://api.github.com/users/sheaam30/orgs","repos_url":"https://api.github.com/users/sheaam30/repos","events_url":"https://api.github.com/users/sheaam30/events{/privacy}","received_events_url":"https://api.github.com/users/sheaam30/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-02T03:38:03Z","updated_at":"2016-07-02T19:15:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b3d7256384f9599376d614ea337a4387ee84fc9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sheaam30/CodeReview/pulls/1/commits","review_comments_url":"https://api.github.com/repos/sheaam30/CodeReview/pulls/1/comments","review_comment_url":"https://api.github.com/repos/sheaam30/CodeReview/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sheaam30/CodeReview/issues/1/comments","statuses_url":"https://api.github.com/repos/sheaam30/CodeReview/statuses/bd6188527c280816c9d44a59bf38fc3330218749","head":{"label":"sheaam30:as-code-review","ref":"as-code-review","sha":"bd6188527c280816c9d44a59bf38fc3330218749","user":{"login":"sheaam30","id":6750107,"avatar_url":"https://avatars.githubusercontent.com/u/6750107?v=3","gravatar_id":"","url":"https://api.github.com/users/sheaam30","html_url":"https://github.com/sheaam30","followers_url":"https://api.github.com/users/sheaam30/followers","following_url":"https://api.github.com/users/sheaam30/following{/other_user}","gists_url":"https://api.github.com/users/sheaam30/gists{/gist_id}","starred_url":"https://api.github.com/users/sheaam30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheaam30/subscriptions","organizations_url":"https://api.github.com/users/sheaam30/orgs","repos_url":"https://api.github.com/users/sheaam30/repos","events_url":"https://api.github.com/users/sheaam30/events{/privacy}","received_events_url":"https://api.github.com/users/sheaam30/received_events","type":"User","site_admin":false},"repo":{"id":62432249,"name":"CodeReview","full_name":"sheaam30/CodeReview","owner":{"login":"sheaam30","id":6750107,"avatar_url":"https://avatars.githubusercontent.com/u/6750107?v=3","gravatar_id":"","url":"https://api.github.com/users/sheaam30","html_url":"https://github.com/sheaam30","followers_url":"https://api.github.com/users/sheaam30/followers","following_url":"https://api.github.com/users/sheaam30/following{/other_user}","gists_url":"https://api.github.com/users/sheaam30/gists{/gist_id}","starred_url":"https://api.github.com/users/sheaam30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheaam30/subscriptions","organizations_url":"https://api.github.com/users/sheaam30/orgs","repos_url":"https://api.github.com/users/sheaam30/repos","events_url":"https://api.github.com/users/sheaam30/events{/privacy}","received_events_url":"https://api.github.com/users/sheaam30/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sheaam30/CodeReview","description":null,"fork":false,"url":"https://api.github.com/repos/sheaam30/CodeReview","forks_url":"https://api.github.com/repos/sheaam30/CodeReview/forks","keys_url":"https://api.github.com/repos/sheaam30/CodeReview/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sheaam30/CodeReview/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sheaam30/CodeReview/teams","hooks_url":"https://api.github.com/repos/sheaam30/CodeReview/hooks","issue_events_url":"https://api.github.com/repos/sheaam30/CodeReview/issues/events{/number}","events_url":"https://api.github.com/repos/sheaam30/CodeReview/events","assignees_url":"https://api.github.com/repos/sheaam30/CodeReview/assignees{/user}","branches_url":"https://api.github.com/repos/sheaam30/CodeReview/branches{/branch}","tags_url":"https://api.github.com/repos/sheaam30/CodeReview/tags","blobs_url":"https://api.github.com/repos/sheaam30/CodeReview/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sheaam30/CodeReview/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sheaam30/CodeReview/git/refs{/sha}","trees_url":"https://api.github.com/repos/sheaam30/CodeReview/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sheaam30/CodeReview/statuses/{sha}","languages_url":"https://api.github.com/repos/sheaam30/CodeReview/languages","stargazers_url":"https://api.github.com/repos/sheaam30/CodeReview/stargazers","contributors_url":"https://api.github.com/repos/sheaam30/CodeReview/contributors","subscribers_url":"https://api.github.com/repos/sheaam30/CodeReview/subscribers","subscription_url":"https://api.github.com/repos/sheaam30/CodeReview/subscription","commits_url":"https://api.github.com/repos/sheaam30/CodeReview/commits{/sha}","git_commits_url":"https://api.github.com/repos/sheaam30/CodeReview/git/commits{/sha}","comments_url":"https://api.github.com/repos/sheaam30/CodeReview/comments{/number}","issue_comment_url":"https://api.github.com/repos/sheaam30/CodeReview/issues/comments{/number}","contents_url":"https://api.github.com/repos/sheaam30/CodeReview/contents/{+path}","compare_url":"https://api.github.com/repos/sheaam30/CodeReview/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sheaam30/CodeReview/merges","archive_url":"https://api.github.com/repos/sheaam30/CodeReview/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sheaam30/CodeReview/downloads","issues_url":"https://api.github.com/repos/sheaam30/CodeReview/issues{/number}","pulls_url":"https://api.github.com/repos/sheaam30/CodeReview/pulls{/number}","milestones_url":"https://api.github.com/repos/sheaam30/CodeReview/milestones{/number}","notifications_url":"https://api.github.com/repos/sheaam30/CodeReview/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sheaam30/CodeReview/labels{/name}","releases_url":"https://api.github.com/repos/sheaam30/CodeReview/releases{/id}","deployments_url":"https://api.github.com/repos/sheaam30/CodeReview/deployments","created_at":"2016-07-02T03:31:44Z","updated_at":"2016-07-02T03:36:13Z","pushed_at":"2016-07-02T03:38:03Z","git_url":"git://github.com/sheaam30/CodeReview.git","ssh_url":"git@github.com:sheaam30/CodeReview.git","clone_url":"https://github.com/sheaam30/CodeReview.git","svn_url":"https://github.com/sheaam30/CodeReview","homepage":null,"size":114,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"sheaam30:master","ref":"master","sha":"a68659175478347790275c431ec67426d1c8645a","user":{"login":"sheaam30","id":6750107,"avatar_url":"https://avatars.githubusercontent.com/u/6750107?v=3","gravatar_id":"","url":"https://api.github.com/users/sheaam30","html_url":"https://github.com/sheaam30","followers_url":"https://api.github.com/users/sheaam30/followers","following_url":"https://api.github.com/users/sheaam30/following{/other_user}","gists_url":"https://api.github.com/users/sheaam30/gists{/gist_id}","starred_url":"https://api.github.com/users/sheaam30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheaam30/subscriptions","organizations_url":"https://api.github.com/users/sheaam30/orgs","repos_url":"https://api.github.com/users/sheaam30/repos","events_url":"https://api.github.com/users/sheaam30/events{/privacy}","received_events_url":"https://api.github.com/users/sheaam30/received_events","type":"User","site_admin":false},"repo":{"id":62432249,"name":"CodeReview","full_name":"sheaam30/CodeReview","owner":{"login":"sheaam30","id":6750107,"avatar_url":"https://avatars.githubusercontent.com/u/6750107?v=3","gravatar_id":"","url":"https://api.github.com/users/sheaam30","html_url":"https://github.com/sheaam30","followers_url":"https://api.github.com/users/sheaam30/followers","following_url":"https://api.github.com/users/sheaam30/following{/other_user}","gists_url":"https://api.github.com/users/sheaam30/gists{/gist_id}","starred_url":"https://api.github.com/users/sheaam30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheaam30/subscriptions","organizations_url":"https://api.github.com/users/sheaam30/orgs","repos_url":"https://api.github.com/users/sheaam30/repos","events_url":"https://api.github.com/users/sheaam30/events{/privacy}","received_events_url":"https://api.github.com/users/sheaam30/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sheaam30/CodeReview","description":null,"fork":false,"url":"https://api.github.com/repos/sheaam30/CodeReview","forks_url":"https://api.github.com/repos/sheaam30/CodeReview/forks","keys_url":"https://api.github.com/repos/sheaam30/CodeReview/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sheaam30/CodeReview/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sheaam30/CodeReview/teams","hooks_url":"https://api.github.com/repos/sheaam30/CodeReview/hooks","issue_events_url":"https://api.github.com/repos/sheaam30/CodeReview/issues/events{/number}","events_url":"https://api.github.com/repos/sheaam30/CodeReview/events","assignees_url":"https://api.github.com/repos/sheaam30/CodeReview/assignees{/user}","branches_url":"https://api.github.com/repos/sheaam30/CodeReview/branches{/branch}","tags_url":"https://api.github.com/repos/sheaam30/CodeReview/tags","blobs_url":"https://api.github.com/repos/sheaam30/CodeReview/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sheaam30/CodeReview/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sheaam30/CodeReview/git/refs{/sha}","trees_url":"https://api.github.com/repos/sheaam30/CodeReview/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sheaam30/CodeReview/statuses/{sha}","languages_url":"https://api.github.com/repos/sheaam30/CodeReview/languages","stargazers_url":"https://api.github.com/repos/sheaam30/CodeReview/stargazers","contributors_url":"https://api.github.com/repos/sheaam30/CodeReview/contributors","subscribers_url":"https://api.github.com/repos/sheaam30/CodeReview/subscribers","subscription_url":"https://api.github.com/repos/sheaam30/CodeReview/subscription","commits_url":"https://api.github.com/repos/sheaam30/CodeReview/commits{/sha}","git_commits_url":"https://api.github.com/repos/sheaam30/CodeReview/git/commits{/sha}","comments_url":"https://api.github.com/repos/sheaam30/CodeReview/comments{/number}","issue_comment_url":"https://api.github.com/repos/sheaam30/CodeReview/issues/comments{/number}","contents_url":"https://api.github.com/repos/sheaam30/CodeReview/contents/{+path}","compare_url":"https://api.github.com/repos/sheaam30/CodeReview/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sheaam30/CodeReview/merges","archive_url":"https://api.github.com/repos/sheaam30/CodeReview/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sheaam30/CodeReview/downloads","issues_url":"https://api.github.com/repos/sheaam30/CodeReview/issues{/number}","pulls_url":"https://api.github.com/repos/sheaam30/CodeReview/pulls{/number}","milestones_url":"https://api.github.com/repos/sheaam30/CodeReview/milestones{/number}","notifications_url":"https://api.github.com/repos/sheaam30/CodeReview/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sheaam30/CodeReview/labels{/name}","releases_url":"https://api.github.com/repos/sheaam30/CodeReview/releases{/id}","deployments_url":"https://api.github.com/repos/sheaam30/CodeReview/deployments","created_at":"2016-07-02T03:31:44Z","updated_at":"2016-07-02T03:36:13Z","pushed_at":"2016-07-02T03:38:03Z","git_url":"git://github.com/sheaam30/CodeReview.git","ssh_url":"git@github.com:sheaam30/CodeReview.git","clone_url":"https://github.com/sheaam30/CodeReview.git","svn_url":"https://github.com/sheaam30/CodeReview","homepage":null,"size":114,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"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/sheaam30/CodeReview/pulls/1"},"html":{"href":"https://github.com/sheaam30/CodeReview/pull/1"},"issue":{"href":"https://api.github.com/repos/sheaam30/CodeReview/issues/1"},"comments":{"href":"https://api.github.com/repos/sheaam30/CodeReview/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/sheaam30/CodeReview/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/sheaam30/CodeReview/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sheaam30/CodeReview/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/sheaam30/CodeReview/statuses/bd6188527c280816c9d44a59bf38fc3330218749"}}}}
{"actor":{"display_login":"sheaam30"}}