{"action":"created","comment":{"url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/comments/73270953","id":73270953,"diff_hunk":"@@ -0,0 +1,53 @@\n+package com.example.inouenaoto.bookmanager_android;\n+\n+import android.app.ActionBar;\n+import android.app.Activity;\n+import android.app.Fragment;\n+import android.app.FragmentManager;\n+import android.app.FragmentTransaction;\n+import android.app.ActionBar.Tab;\n+import android.app.ListFragment;\n+\n+\n+public class TabListener<T extends Fragment> implements ActionBar.TabListener {\n+    private Fragment mFragment;\n+    private final Activity mActivity;\n+    private final String mTag;\n+\n+    //コンストラクタ\n+    public TabListener(Activity activity, String tag, Class<T> clz) {\n+        mActivity = activity;\n+        mTag = tag;\n+        mFragment = mActivity.getFragmentManager().findFragmentByTag(mTag);\n+    }\n+\n+    //タブが選択されたとき\n+    public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) {\n+\n+        if (mTag == \"tag1\") {\n+            Fragment listFragment = new BookListFragment();\n+            FragmentManager manager = mActivity.getFragmentManager();\n+            FragmentTransaction transaction = manager.beginTransaction();\n+            transaction.replace(R.id.container, listFragment);\n+            transaction.commit();\n+        } else if (mTag == \"tag2\") {\n+            Fragment settingFragment = new SettingFragment();\n+            FragmentManager manager = mActivity.getFragmentManager();\n+            FragmentTransaction transaction = manager.beginTransaction();\n+            transaction.replace(R.id.container, settingFragment);\n+            transaction.commit();","path":"bookManager-Android/app/src/main/java/com/example/inouenaoto/bookmanager_android/TabListener.java","position":38,"original_position":38,"commit_id":"3a24035e322970f1aa08f350547592df323a2ddc","original_commit_id":"3a24035e322970f1aa08f350547592df323a2ddc","user":{"login":"auglish-cq","id":11718226,"avatar_url":"https://avatars.githubusercontent.com/u/11718226?v=3","gravatar_id":"","url":"https://api.github.com/users/auglish-cq","html_url":"https://github.com/auglish-cq","followers_url":"https://api.github.com/users/auglish-cq/followers","following_url":"https://api.github.com/users/auglish-cq/following{/other_user}","gists_url":"https://api.github.com/users/auglish-cq/gists{/gist_id}","starred_url":"https://api.github.com/users/auglish-cq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auglish-cq/subscriptions","organizations_url":"https://api.github.com/users/auglish-cq/orgs","repos_url":"https://api.github.com/users/auglish-cq/repos","events_url":"https://api.github.com/users/auglish-cq/events{/privacy}","received_events_url":"https://api.github.com/users/auglish-cq/received_events","type":"User","site_admin":false},"body":"重複している処理があるので、その解消をお願いします。\r\n\r\n引数については適切に変数を与えれば解決できるはずです。","created_at":"2016-08-03T02:12:28Z","updated_at":"2016-08-03T02:12:28Z","html_url":"https://github.com/ninoue-cq/bookManager-Android/pull/2#discussion_r73270953","pull_request_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/comments/73270953"},"html":{"href":"https://github.com/ninoue-cq/bookManager-Android/pull/2#discussion_r73270953"},"pull_request":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/2","id":79509258,"html_url":"https://github.com/ninoue-cq/bookManager-Android/pull/2","diff_url":"https://github.com/ninoue-cq/bookManager-Android/pull/2.diff","patch_url":"https://github.com/ninoue-cq/bookManager-Android/pull/2.patch","issue_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/2","number":2,"state":"open","locked":false,"title":"Get api","user":{"login":"ninoue-cq","id":20140472,"avatar_url":"https://avatars.githubusercontent.com/u/20140472?v=3","gravatar_id":"","url":"https://api.github.com/users/ninoue-cq","html_url":"https://github.com/ninoue-cq","followers_url":"https://api.github.com/users/ninoue-cq/followers","following_url":"https://api.github.com/users/ninoue-cq/following{/other_user}","gists_url":"https://api.github.com/users/ninoue-cq/gists{/gist_id}","starred_url":"https://api.github.com/users/ninoue-cq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninoue-cq/subscriptions","organizations_url":"https://api.github.com/users/ninoue-cq/orgs","repos_url":"https://api.github.com/users/ninoue-cq/repos","events_url":"https://api.github.com/users/ninoue-cq/events{/privacy}","received_events_url":"https://api.github.com/users/ninoue-cq/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-01T03:39:13Z","updated_at":"2016-08-03T02:12:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed262afc5daff6ea88ee18d2d447d3e782b083db","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/2/commits","review_comments_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/2/comments","review_comment_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/2/comments","statuses_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/statuses/3a24035e322970f1aa08f350547592df323a2ddc","head":{"label":"ninoue-cq:getAPI","ref":"getAPI","sha":"3a24035e322970f1aa08f350547592df323a2ddc","user":{"login":"ninoue-cq","id":20140472,"avatar_url":"https://avatars.githubusercontent.com/u/20140472?v=3","gravatar_id":"","url":"https://api.github.com/users/ninoue-cq","html_url":"https://github.com/ninoue-cq","followers_url":"https://api.github.com/users/ninoue-cq/followers","following_url":"https://api.github.com/users/ninoue-cq/following{/other_user}","gists_url":"https://api.github.com/users/ninoue-cq/gists{/gist_id}","starred_url":"https://api.github.com/users/ninoue-cq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninoue-cq/subscriptions","organizations_url":"https://api.github.com/users/ninoue-cq/orgs","repos_url":"https://api.github.com/users/ninoue-cq/repos","events_url":"https://api.github.com/users/ninoue-cq/events{/privacy}","received_events_url":"https://api.github.com/users/ninoue-cq/received_events","type":"User","site_admin":false},"repo":{"id":63529113,"name":"bookManager-Android","full_name":"ninoue-cq/bookManager-Android","owner":{"login":"ninoue-cq","id":20140472,"avatar_url":"https://avatars.githubusercontent.com/u/20140472?v=3","gravatar_id":"","url":"https://api.github.com/users/ninoue-cq","html_url":"https://github.com/ninoue-cq","followers_url":"https://api.github.com/users/ninoue-cq/followers","following_url":"https://api.github.com/users/ninoue-cq/following{/other_user}","gists_url":"https://api.github.com/users/ninoue-cq/gists{/gist_id}","starred_url":"https://api.github.com/users/ninoue-cq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninoue-cq/subscriptions","organizations_url":"https://api.github.com/users/ninoue-cq/orgs","repos_url":"https://api.github.com/users/ninoue-cq/repos","events_url":"https://api.github.com/users/ninoue-cq/events{/privacy}","received_events_url":"https://api.github.com/users/ninoue-cq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ninoue-cq/bookManager-Android","description":null,"fork":false,"url":"https://api.github.com/repos/ninoue-cq/bookManager-Android","forks_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/forks","keys_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/teams","hooks_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/hooks","issue_events_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/events{/number}","events_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/events","assignees_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/assignees{/user}","branches_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/branches{/branch}","tags_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/tags","blobs_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/languages","stargazers_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/stargazers","contributors_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/contributors","subscribers_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/subscribers","subscription_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/subscription","commits_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/contents/{+path}","compare_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/merges","archive_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/downloads","issues_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues{/number}","pulls_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/labels{/name}","releases_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/releases{/id}","deployments_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/deployments","created_at":"2016-07-17T11:43:30Z","updated_at":"2016-07-17T11:53:27Z","pushed_at":"2016-08-02T10:20:59Z","git_url":"git://github.com/ninoue-cq/bookManager-Android.git","ssh_url":"git@github.com:ninoue-cq/bookManager-Android.git","clone_url":"https://github.com/ninoue-cq/bookManager-Android.git","svn_url":"https://github.com/ninoue-cq/bookManager-Android","homepage":null,"size":254,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ninoue-cq:develop","ref":"develop","sha":"cd79aae1240072190ee8f02bfd288d69c8e6dd27","user":{"login":"ninoue-cq","id":20140472,"avatar_url":"https://avatars.githubusercontent.com/u/20140472?v=3","gravatar_id":"","url":"https://api.github.com/users/ninoue-cq","html_url":"https://github.com/ninoue-cq","followers_url":"https://api.github.com/users/ninoue-cq/followers","following_url":"https://api.github.com/users/ninoue-cq/following{/other_user}","gists_url":"https://api.github.com/users/ninoue-cq/gists{/gist_id}","starred_url":"https://api.github.com/users/ninoue-cq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninoue-cq/subscriptions","organizations_url":"https://api.github.com/users/ninoue-cq/orgs","repos_url":"https://api.github.com/users/ninoue-cq/repos","events_url":"https://api.github.com/users/ninoue-cq/events{/privacy}","received_events_url":"https://api.github.com/users/ninoue-cq/received_events","type":"User","site_admin":false},"repo":{"id":63529113,"name":"bookManager-Android","full_name":"ninoue-cq/bookManager-Android","owner":{"login":"ninoue-cq","id":20140472,"avatar_url":"https://avatars.githubusercontent.com/u/20140472?v=3","gravatar_id":"","url":"https://api.github.com/users/ninoue-cq","html_url":"https://github.com/ninoue-cq","followers_url":"https://api.github.com/users/ninoue-cq/followers","following_url":"https://api.github.com/users/ninoue-cq/following{/other_user}","gists_url":"https://api.github.com/users/ninoue-cq/gists{/gist_id}","starred_url":"https://api.github.com/users/ninoue-cq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninoue-cq/subscriptions","organizations_url":"https://api.github.com/users/ninoue-cq/orgs","repos_url":"https://api.github.com/users/ninoue-cq/repos","events_url":"https://api.github.com/users/ninoue-cq/events{/privacy}","received_events_url":"https://api.github.com/users/ninoue-cq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ninoue-cq/bookManager-Android","description":null,"fork":false,"url":"https://api.github.com/repos/ninoue-cq/bookManager-Android","forks_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/forks","keys_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/teams","hooks_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/hooks","issue_events_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/events{/number}","events_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/events","assignees_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/assignees{/user}","branches_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/branches{/branch}","tags_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/tags","blobs_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/languages","stargazers_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/stargazers","contributors_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/contributors","subscribers_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/subscribers","subscription_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/subscription","commits_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/contents/{+path}","compare_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/merges","archive_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/downloads","issues_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues{/number}","pulls_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/labels{/name}","releases_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/releases{/id}","deployments_url":"https://api.github.com/repos/ninoue-cq/bookManager-Android/deployments","created_at":"2016-07-17T11:43:30Z","updated_at":"2016-07-17T11:53:27Z","pushed_at":"2016-08-02T10:20:59Z","git_url":"git://github.com/ninoue-cq/bookManager-Android.git","ssh_url":"git@github.com:ninoue-cq/bookManager-Android.git","clone_url":"https://github.com/ninoue-cq/bookManager-Android.git","svn_url":"https://github.com/ninoue-cq/bookManager-Android","homepage":null,"size":254,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/2"},"html":{"href":"https://github.com/ninoue-cq/bookManager-Android/pull/2"},"issue":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/2"},"comments":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/ninoue-cq/bookManager-Android/statuses/3a24035e322970f1aa08f350547592df323a2ddc"}}}}
{"actor":{"display_login":"auglish-cq"}}