{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/comments/71638003","id":71638003,"diff_hunk":"@@ -64,10 +89,79 @@ private void setChecked(boolean isChecked) {\n         mCheckBoxSunday.setChecked(isChecked);\n     }\n \n+    private void allChecboxAreChecked() {\n+        mCheckBoxEveryday.setChecked(\n+            mCheckBoxMonday.isChecked() && mCheckBoxTuesday.isChecked() && mCheckBoxWednesday\n+                .isChecked() && mCheckBoxThursday.isChecked() && mCheckBoxFriday.isChecked() &&\n+                mCheckBoxSaturday.isChecked() && mCheckBoxSunday.isChecked());\n+    }\n+\n+    private void getRepeat() {\n+        Intent returnIntent = new Intent();\n+        if (mCheckBoxMonday.isChecked())\n+            returnIntent.putExtra(Constants.INTENT_REPEAT_MONDAY, mCheckBoxMonday.isChecked());\n+        if (mCheckBoxTuesday.isChecked())\n+            returnIntent.putExtra(Constants.INTENT_REPEAT_TUESDAY, mCheckBoxTuesday.isChecked());\n+        if (mCheckBoxWednesday.isChecked())\n+            returnIntent\n+                .putExtra(Constants.INTENT_REPEAT_WEDNESDAY, mCheckBoxWednesday.isChecked());\n+        if (mCheckBoxThursday.isChecked())\n+            returnIntent.putExtra(Constants.INTENT_REPEAT_THURSDAY, mCheckBoxThursday.isChecked());\n+        if (mCheckBoxFriday.isChecked())\n+            returnIntent.putExtra(Constants.INTENT_REPEAT_FRIDAY, mCheckBoxFriday.isChecked());\n+        if (mCheckBoxSaturday.isChecked())\n+            returnIntent.putExtra(Constants.INTENT_REPEAT_SATURDAY, mCheckBoxSaturday.isChecked());\n+        if (mCheckBoxSunday.isChecked())\n+            returnIntent.putExtra(Constants.INTENT_REPEAT_SUNDAY, mCheckBoxSunday.isChecked());\n+        if (mCheckBoxEveryday.isChecked())\n+            returnIntent.putExtra(Constants.INTENT_REPEAT_EVERYDAY, mCheckBoxEveryday.isChecked());\n+        setResult(Activity.RESULT_OK, returnIntent);\n+        finish();\n+    }\n+\n     @Override\n-    public void onCheckedChanged(CompoundButton compoundButton, boolean b) {\n-        if (compoundButton.getId() == R.id.repeat_everyday) {\n-            setChecked(mCheckBoxEveryday.isChecked());\n+    public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) {\n+        switch (compoundButton.getId()) {\n+            case R.id.checkbox_every_monday:\n+                allChecboxAreChecked();\n+                break;\n+            case R.id.checkbox_every_tuesday:\n+                allChecboxAreChecked();\n+                break;\n+            case R.id.checkbox_every_wednesday:\n+                allChecboxAreChecked();\n+                break;\n+            case R.id.checkbox_every_thursday:\n+                allChecboxAreChecked();\n+                break;\n+            case R.id.checkbox_every_friday:\n+                allChecboxAreChecked();\n+                break;\n+            case R.id.checkbox_every_saturday:\n+                allChecboxAreChecked();\n+                break;\n+            case R.id.checkbox_every_sunday:","path":"app/src/main/java/com/example/framgia/alarmclock/ui/activity/RepeatActivity.java","position":148,"original_position":148,"commit_id":"8730076e5cb2b1bdc5c587d96b5f8c3117f2e959","original_commit_id":"8730076e5cb2b1bdc5c587d96b5f8c3117f2e959","user":{"login":"b1acKr0se","id":8596158,"avatar_url":"https://avatars.githubusercontent.com/u/8596158?v=3","gravatar_id":"","url":"https://api.github.com/users/b1acKr0se","html_url":"https://github.com/b1acKr0se","followers_url":"https://api.github.com/users/b1acKr0se/followers","following_url":"https://api.github.com/users/b1acKr0se/following{/other_user}","gists_url":"https://api.github.com/users/b1acKr0se/gists{/gist_id}","starred_url":"https://api.github.com/users/b1acKr0se/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b1acKr0se/subscriptions","organizations_url":"https://api.github.com/users/b1acKr0se/orgs","repos_url":"https://api.github.com/users/b1acKr0se/repos","events_url":"https://api.github.com/users/b1acKr0se/events{/privacy}","received_events_url":"https://api.github.com/users/b1acKr0se/received_events","type":"User","site_admin":false},"body":"Tất cả các case này đều gọi cùng 1 hàm thì làm thế nào viết nó ngắn lại đi","created_at":"2016-07-21T02:16:46Z","updated_at":"2016-07-21T02:16:46Z","html_url":"https://github.com/framgia/Alarm_Clock_1/pull/13#discussion_r71638003","pull_request_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/comments/71638003"},"html":{"href":"https://github.com/framgia/Alarm_Clock_1/pull/13#discussion_r71638003"},"pull_request":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/13","id":78100735,"html_url":"https://github.com/framgia/Alarm_Clock_1/pull/13","diff_url":"https://github.com/framgia/Alarm_Clock_1/pull/13.diff","patch_url":"https://github.com/framgia/Alarm_Clock_1/pull/13.patch","issue_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/issues/13","number":13,"state":"open","locked":false,"title":"alarm_repeat","user":{"login":"dangquanuet","id":5498994,"avatar_url":"https://avatars.githubusercontent.com/u/5498994?v=3","gravatar_id":"","url":"https://api.github.com/users/dangquanuet","html_url":"https://github.com/dangquanuet","followers_url":"https://api.github.com/users/dangquanuet/followers","following_url":"https://api.github.com/users/dangquanuet/following{/other_user}","gists_url":"https://api.github.com/users/dangquanuet/gists{/gist_id}","starred_url":"https://api.github.com/users/dangquanuet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dangquanuet/subscriptions","organizations_url":"https://api.github.com/users/dangquanuet/orgs","repos_url":"https://api.github.com/users/dangquanuet/repos","events_url":"https://api.github.com/users/dangquanuet/events{/privacy}","received_events_url":"https://api.github.com/users/dangquanuet/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-20T07:34:21Z","updated_at":"2016-07-21T02:16:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6d458d9dcce349fbf94c196387fee046f4731f8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/13/commits","review_comments_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/13/comments","review_comment_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/issues/13/comments","statuses_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/statuses/8730076e5cb2b1bdc5c587d96b5f8c3117f2e959","head":{"label":"dangquanuet:alarm_repeat","ref":"alarm_repeat","sha":"8730076e5cb2b1bdc5c587d96b5f8c3117f2e959","user":{"login":"dangquanuet","id":5498994,"avatar_url":"https://avatars.githubusercontent.com/u/5498994?v=3","gravatar_id":"","url":"https://api.github.com/users/dangquanuet","html_url":"https://github.com/dangquanuet","followers_url":"https://api.github.com/users/dangquanuet/followers","following_url":"https://api.github.com/users/dangquanuet/following{/other_user}","gists_url":"https://api.github.com/users/dangquanuet/gists{/gist_id}","starred_url":"https://api.github.com/users/dangquanuet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dangquanuet/subscriptions","organizations_url":"https://api.github.com/users/dangquanuet/orgs","repos_url":"https://api.github.com/users/dangquanuet/repos","events_url":"https://api.github.com/users/dangquanuet/events{/privacy}","received_events_url":"https://api.github.com/users/dangquanuet/received_events","type":"User","site_admin":false},"repo":{"id":63028831,"name":"Alarm_Clock_1","full_name":"dangquanuet/Alarm_Clock_1","owner":{"login":"dangquanuet","id":5498994,"avatar_url":"https://avatars.githubusercontent.com/u/5498994?v=3","gravatar_id":"","url":"https://api.github.com/users/dangquanuet","html_url":"https://github.com/dangquanuet","followers_url":"https://api.github.com/users/dangquanuet/followers","following_url":"https://api.github.com/users/dangquanuet/following{/other_user}","gists_url":"https://api.github.com/users/dangquanuet/gists{/gist_id}","starred_url":"https://api.github.com/users/dangquanuet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dangquanuet/subscriptions","organizations_url":"https://api.github.com/users/dangquanuet/orgs","repos_url":"https://api.github.com/users/dangquanuet/repos","events_url":"https://api.github.com/users/dangquanuet/events{/privacy}","received_events_url":"https://api.github.com/users/dangquanuet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dangquanuet/Alarm_Clock_1","description":"Framgia Alarm Clock App (training)","fork":true,"url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1","forks_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/forks","keys_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/teams","hooks_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/hooks","issue_events_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/issues/events{/number}","events_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/events","assignees_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/assignees{/user}","branches_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/branches{/branch}","tags_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/tags","blobs_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/git/refs{/sha}","trees_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/statuses/{sha}","languages_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/languages","stargazers_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/stargazers","contributors_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/contributors","subscribers_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/subscribers","subscription_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/subscription","commits_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/commits{/sha}","git_commits_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/git/commits{/sha}","comments_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/comments{/number}","issue_comment_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/issues/comments{/number}","contents_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/contents/{+path}","compare_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/merges","archive_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/downloads","issues_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/issues{/number}","pulls_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/pulls{/number}","milestones_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/milestones{/number}","notifications_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/labels{/name}","releases_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/releases{/id}","deployments_url":"https://api.github.com/repos/dangquanuet/Alarm_Clock_1/deployments","created_at":"2016-07-11T02:00:21Z","updated_at":"2016-07-05T11:48:32Z","pushed_at":"2016-07-21T02:04:59Z","git_url":"git://github.com/dangquanuet/Alarm_Clock_1.git","ssh_url":"git@github.com:dangquanuet/Alarm_Clock_1.git","clone_url":"https://github.com/dangquanuet/Alarm_Clock_1.git","svn_url":"https://github.com/dangquanuet/Alarm_Clock_1","homepage":null,"size":437,"stargazers_count":0,"watchers_count":0,"language":null,"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":"framgia:develop","ref":"develop","sha":"6aedc98cf85a6b4b13c50f89fdcc6023f7f6408d","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":62632627,"name":"Alarm_Clock_1","full_name":"framgia/Alarm_Clock_1","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/Alarm_Clock_1","description":"Framgia Alarm Clock App (training)","fork":false,"url":"https://api.github.com/repos/framgia/Alarm_Clock_1","forks_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/forks","keys_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/teams","hooks_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/hooks","issue_events_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/events","assignees_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/tags","blobs_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/languages","stargazers_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/stargazers","contributors_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/contributors","subscribers_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/subscribers","subscription_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/subscription","commits_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/merges","archive_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/downloads","issues_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/labels{/name}","releases_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/deployments","created_at":"2016-07-05T11:48:32Z","updated_at":"2016-07-05T11:48:32Z","pushed_at":"2016-07-21T02:04:59Z","git_url":"git://github.com/framgia/Alarm_Clock_1.git","ssh_url":"git@github.com:framgia/Alarm_Clock_1.git","clone_url":"https://github.com/framgia/Alarm_Clock_1.git","svn_url":"https://github.com/framgia/Alarm_Clock_1","homepage":null,"size":1471,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/13"},"html":{"href":"https://github.com/framgia/Alarm_Clock_1/pull/13"},"issue":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/issues/13"},"comments":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/statuses/8730076e5cb2b1bdc5c587d96b5f8c3117f2e959"}}}}
{"actor":{"display_login":"b1acKr0se"}}