{"action":"created","comment":{"url":"https://api.github.com/repos/wzmame/pictour/pulls/comments/45946522","id":45946522,"diff_hunk":"@@ -0,0 +1,90 @@\n+package wzmame.pictour.activity;\n+\n+import android.support.v4.app.Fragment;\n+import android.support.v4.app.FragmentManager;\n+import android.support.v4.app.FragmentPagerAdapter;\n+import android.support.v4.view.ViewPager;\n+import android.support.v7.app.AppCompatActivity;\n+import android.os.Bundle;\n+import android.view.Menu;\n+import android.view.MenuItem;\n+\n+import com.astuetz.PagerSlidingTabStrip;\n+\n+import wzmame.pictour.R;\n+import wzmame.pictour.fragment.TourListViewFragment;\n+import wzmame.pictour.fragment.TourMapViewFragment;\n+\n+public class TourView extends AppCompatActivity {\n+    ViewPager vPager;\n+    FragmentPagerAdapter adapter;\n+    @Override\n+    protected void onCreate(Bundle savedInstanceState) {\n+        super.onCreate(savedInstanceState);\n+        setContentView(R.layout.activity_tour_view);\n+        vPager = (ViewPager)findViewById(R.id.viewpager);\n+        adapter = new TourViewPagerAdapter(getSupportFragmentManager());\n+        vPager.setAdapter(adapter);\n+        PagerSlidingTabStrip tabStrip = (PagerSlidingTabStrip) findViewById(R.id.tabs);\n+        tabStrip.setViewPager(vPager);\n+    }\n+\n+    @Override\n+    public boolean onCreateOptionsMenu(Menu menu) {\n+        // Inflate the menu; this adds items to the action bar if it is present.\n+        getMenuInflater().inflate(R.menu.menu_tour_view, menu);\n+        return true;\n+    }\n+\n+    @Override\n+    public boolean onOptionsItemSelected(MenuItem item) {\n+        // Handle action bar item clicks here. The action bar will\n+        // automatically handle clicks on the Home/Up button, so long\n+        // as you specify a parent activity in AndroidManifest.xml.\n+        int id = item.getItemId();\n+\n+        //noinspection SimplifiableIfStatement\n+        if (id == R.id.action_settings) {\n+            return true;\n+        }\n+\n+        return super.onOptionsItemSelected(item);\n+    }\n+\n+    public class TourViewPagerAdapter extends FragmentPagerAdapter {\n+\n+        final int PAGE_COUNT = 2;\n+        String[] titles;\n+        TourListViewFragment lvFragment;\n+        TourMapViewFragment mvFragment;\n+\n+\n+        public TourViewPagerAdapter(FragmentManager fm) {\n+            super(fm);\n+            lvFragment= new TourListViewFragment();\n+            mvFragment = new TourMapViewFragment();\n+            titles = new String[2];\n+            titles[0] = \"List\";\n+            titles[1] = \"Map\";\n+        }\n+\n+        @Override\n+        public Fragment getItem(int position) {\n+            if(position == 0) {\n+                return lvFragment;\n+            }else {\n+                return mvFragment;\n+            }\n+        }\n+\n+        @Override\n+        public CharSequence getPageTitle(int position) {\n+            return titles[position];\n+        }\n+\n+        @Override\n+        public int getCount() {\n+            return PAGE_COUNT;","path":"app/src/main/java/wzmame/pictour/activity/TourView.java","position":87,"original_position":87,"commit_id":"9daebeefeb67d22213e3714b20ae4392c82c120a","original_commit_id":"d0383a5757e402556a21a3709870907fd655f865","user":{"login":"jeffbmartinez","id":5183787,"avatar_url":"https://avatars.githubusercontent.com/u/5183787?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffbmartinez","html_url":"https://github.com/jeffbmartinez","followers_url":"https://api.github.com/users/jeffbmartinez/followers","following_url":"https://api.github.com/users/jeffbmartinez/following{/other_user}","gists_url":"https://api.github.com/users/jeffbmartinez/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffbmartinez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffbmartinez/subscriptions","organizations_url":"https://api.github.com/users/jeffbmartinez/orgs","repos_url":"https://api.github.com/users/jeffbmartinez/repos","events_url":"https://api.github.com/users/jeffbmartinez/events{/privacy}","received_events_url":"https://api.github.com/users/jeffbmartinez/received_events","type":"User","site_admin":false},"body":"You should return `titles.length()` or `titles.size()` or whatever it is.","created_at":"2015-11-26T06:04:27Z","updated_at":"2015-11-26T06:04:27Z","html_url":"https://github.com/wzmame/pictour/pull/19#discussion_r45946522","pull_request_url":"https://api.github.com/repos/wzmame/pictour/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/wzmame/pictour/pulls/comments/45946522"},"html":{"href":"https://github.com/wzmame/pictour/pull/19#discussion_r45946522"},"pull_request":{"href":"https://api.github.com/repos/wzmame/pictour/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/wzmame/pictour/pulls/19","id":51874830,"html_url":"https://github.com/wzmame/pictour/pull/19","diff_url":"https://github.com/wzmame/pictour/pull/19.diff","patch_url":"https://github.com/wzmame/pictour/pull/19.patch","issue_url":"https://api.github.com/repos/wzmame/pictour/issues/19","number":19,"state":"open","locked":false,"title":"create tour view activity","user":{"login":"FrancisMengx","id":2831600,"avatar_url":"https://avatars.githubusercontent.com/u/2831600?v=3","gravatar_id":"","url":"https://api.github.com/users/FrancisMengx","html_url":"https://github.com/FrancisMengx","followers_url":"https://api.github.com/users/FrancisMengx/followers","following_url":"https://api.github.com/users/FrancisMengx/following{/other_user}","gists_url":"https://api.github.com/users/FrancisMengx/gists{/gist_id}","starred_url":"https://api.github.com/users/FrancisMengx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrancisMengx/subscriptions","organizations_url":"https://api.github.com/users/FrancisMengx/orgs","repos_url":"https://api.github.com/users/FrancisMengx/repos","events_url":"https://api.github.com/users/FrancisMengx/events{/privacy}","received_events_url":"https://api.github.com/users/FrancisMengx/received_events","type":"User","site_admin":false},"body":"#18 ","created_at":"2015-11-26T05:48:35Z","updated_at":"2015-11-26T06:04:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2846c81fb3cb4a69016764ae91a2fb9262e11dcc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wzmame/pictour/pulls/19/commits","review_comments_url":"https://api.github.com/repos/wzmame/pictour/pulls/19/comments","review_comment_url":"https://api.github.com/repos/wzmame/pictour/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wzmame/pictour/issues/19/comments","statuses_url":"https://api.github.com/repos/wzmame/pictour/statuses/9daebeefeb67d22213e3714b20ae4392c82c120a","head":{"label":"wzmame:create-tour-view-activity","ref":"create-tour-view-activity","sha":"9daebeefeb67d22213e3714b20ae4392c82c120a","user":{"login":"wzmame","id":15680205,"avatar_url":"https://avatars.githubusercontent.com/u/15680205?v=3","gravatar_id":"","url":"https://api.github.com/users/wzmame","html_url":"https://github.com/wzmame","followers_url":"https://api.github.com/users/wzmame/followers","following_url":"https://api.github.com/users/wzmame/following{/other_user}","gists_url":"https://api.github.com/users/wzmame/gists{/gist_id}","starred_url":"https://api.github.com/users/wzmame/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wzmame/subscriptions","organizations_url":"https://api.github.com/users/wzmame/orgs","repos_url":"https://api.github.com/users/wzmame/repos","events_url":"https://api.github.com/users/wzmame/events{/privacy}","received_events_url":"https://api.github.com/users/wzmame/received_events","type":"Organization","site_admin":false},"repo":{"id":45646975,"name":"pictour","full_name":"wzmame/pictour","owner":{"login":"wzmame","id":15680205,"avatar_url":"https://avatars.githubusercontent.com/u/15680205?v=3","gravatar_id":"","url":"https://api.github.com/users/wzmame","html_url":"https://github.com/wzmame","followers_url":"https://api.github.com/users/wzmame/followers","following_url":"https://api.github.com/users/wzmame/following{/other_user}","gists_url":"https://api.github.com/users/wzmame/gists{/gist_id}","starred_url":"https://api.github.com/users/wzmame/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wzmame/subscriptions","organizations_url":"https://api.github.com/users/wzmame/orgs","repos_url":"https://api.github.com/users/wzmame/repos","events_url":"https://api.github.com/users/wzmame/events{/privacy}","received_events_url":"https://api.github.com/users/wzmame/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wzmame/pictour","description":"","fork":false,"url":"https://api.github.com/repos/wzmame/pictour","forks_url":"https://api.github.com/repos/wzmame/pictour/forks","keys_url":"https://api.github.com/repos/wzmame/pictour/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wzmame/pictour/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wzmame/pictour/teams","hooks_url":"https://api.github.com/repos/wzmame/pictour/hooks","issue_events_url":"https://api.github.com/repos/wzmame/pictour/issues/events{/number}","events_url":"https://api.github.com/repos/wzmame/pictour/events","assignees_url":"https://api.github.com/repos/wzmame/pictour/assignees{/user}","branches_url":"https://api.github.com/repos/wzmame/pictour/branches{/branch}","tags_url":"https://api.github.com/repos/wzmame/pictour/tags","blobs_url":"https://api.github.com/repos/wzmame/pictour/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wzmame/pictour/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wzmame/pictour/git/refs{/sha}","trees_url":"https://api.github.com/repos/wzmame/pictour/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wzmame/pictour/statuses/{sha}","languages_url":"https://api.github.com/repos/wzmame/pictour/languages","stargazers_url":"https://api.github.com/repos/wzmame/pictour/stargazers","contributors_url":"https://api.github.com/repos/wzmame/pictour/contributors","subscribers_url":"https://api.github.com/repos/wzmame/pictour/subscribers","subscription_url":"https://api.github.com/repos/wzmame/pictour/subscription","commits_url":"https://api.github.com/repos/wzmame/pictour/commits{/sha}","git_commits_url":"https://api.github.com/repos/wzmame/pictour/git/commits{/sha}","comments_url":"https://api.github.com/repos/wzmame/pictour/comments{/number}","issue_comment_url":"https://api.github.com/repos/wzmame/pictour/issues/comments{/number}","contents_url":"https://api.github.com/repos/wzmame/pictour/contents/{+path}","compare_url":"https://api.github.com/repos/wzmame/pictour/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wzmame/pictour/merges","archive_url":"https://api.github.com/repos/wzmame/pictour/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wzmame/pictour/downloads","issues_url":"https://api.github.com/repos/wzmame/pictour/issues{/number}","pulls_url":"https://api.github.com/repos/wzmame/pictour/pulls{/number}","milestones_url":"https://api.github.com/repos/wzmame/pictour/milestones{/number}","notifications_url":"https://api.github.com/repos/wzmame/pictour/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wzmame/pictour/labels{/name}","releases_url":"https://api.github.com/repos/wzmame/pictour/releases{/id}","created_at":"2015-11-05T23:42:42Z","updated_at":"2015-11-20T22:16:28Z","pushed_at":"2015-11-26T05:59:23Z","git_url":"git://github.com/wzmame/pictour.git","ssh_url":"git@github.com:wzmame/pictour.git","clone_url":"https://github.com/wzmame/pictour.git","svn_url":"https://github.com/wzmame/pictour","homepage":null,"size":143,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":8,"forks":1,"open_issues":8,"watchers":1,"default_branch":"master"}},"base":{"label":"wzmame:master","ref":"master","sha":"277ea4d6abd1c6dcab378567f5afcca020d71ff8","user":{"login":"wzmame","id":15680205,"avatar_url":"https://avatars.githubusercontent.com/u/15680205?v=3","gravatar_id":"","url":"https://api.github.com/users/wzmame","html_url":"https://github.com/wzmame","followers_url":"https://api.github.com/users/wzmame/followers","following_url":"https://api.github.com/users/wzmame/following{/other_user}","gists_url":"https://api.github.com/users/wzmame/gists{/gist_id}","starred_url":"https://api.github.com/users/wzmame/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wzmame/subscriptions","organizations_url":"https://api.github.com/users/wzmame/orgs","repos_url":"https://api.github.com/users/wzmame/repos","events_url":"https://api.github.com/users/wzmame/events{/privacy}","received_events_url":"https://api.github.com/users/wzmame/received_events","type":"Organization","site_admin":false},"repo":{"id":45646975,"name":"pictour","full_name":"wzmame/pictour","owner":{"login":"wzmame","id":15680205,"avatar_url":"https://avatars.githubusercontent.com/u/15680205?v=3","gravatar_id":"","url":"https://api.github.com/users/wzmame","html_url":"https://github.com/wzmame","followers_url":"https://api.github.com/users/wzmame/followers","following_url":"https://api.github.com/users/wzmame/following{/other_user}","gists_url":"https://api.github.com/users/wzmame/gists{/gist_id}","starred_url":"https://api.github.com/users/wzmame/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wzmame/subscriptions","organizations_url":"https://api.github.com/users/wzmame/orgs","repos_url":"https://api.github.com/users/wzmame/repos","events_url":"https://api.github.com/users/wzmame/events{/privacy}","received_events_url":"https://api.github.com/users/wzmame/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wzmame/pictour","description":"","fork":false,"url":"https://api.github.com/repos/wzmame/pictour","forks_url":"https://api.github.com/repos/wzmame/pictour/forks","keys_url":"https://api.github.com/repos/wzmame/pictour/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wzmame/pictour/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wzmame/pictour/teams","hooks_url":"https://api.github.com/repos/wzmame/pictour/hooks","issue_events_url":"https://api.github.com/repos/wzmame/pictour/issues/events{/number}","events_url":"https://api.github.com/repos/wzmame/pictour/events","assignees_url":"https://api.github.com/repos/wzmame/pictour/assignees{/user}","branches_url":"https://api.github.com/repos/wzmame/pictour/branches{/branch}","tags_url":"https://api.github.com/repos/wzmame/pictour/tags","blobs_url":"https://api.github.com/repos/wzmame/pictour/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wzmame/pictour/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wzmame/pictour/git/refs{/sha}","trees_url":"https://api.github.com/repos/wzmame/pictour/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wzmame/pictour/statuses/{sha}","languages_url":"https://api.github.com/repos/wzmame/pictour/languages","stargazers_url":"https://api.github.com/repos/wzmame/pictour/stargazers","contributors_url":"https://api.github.com/repos/wzmame/pictour/contributors","subscribers_url":"https://api.github.com/repos/wzmame/pictour/subscribers","subscription_url":"https://api.github.com/repos/wzmame/pictour/subscription","commits_url":"https://api.github.com/repos/wzmame/pictour/commits{/sha}","git_commits_url":"https://api.github.com/repos/wzmame/pictour/git/commits{/sha}","comments_url":"https://api.github.com/repos/wzmame/pictour/comments{/number}","issue_comment_url":"https://api.github.com/repos/wzmame/pictour/issues/comments{/number}","contents_url":"https://api.github.com/repos/wzmame/pictour/contents/{+path}","compare_url":"https://api.github.com/repos/wzmame/pictour/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wzmame/pictour/merges","archive_url":"https://api.github.com/repos/wzmame/pictour/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wzmame/pictour/downloads","issues_url":"https://api.github.com/repos/wzmame/pictour/issues{/number}","pulls_url":"https://api.github.com/repos/wzmame/pictour/pulls{/number}","milestones_url":"https://api.github.com/repos/wzmame/pictour/milestones{/number}","notifications_url":"https://api.github.com/repos/wzmame/pictour/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wzmame/pictour/labels{/name}","releases_url":"https://api.github.com/repos/wzmame/pictour/releases{/id}","created_at":"2015-11-05T23:42:42Z","updated_at":"2015-11-20T22:16:28Z","pushed_at":"2015-11-26T05:59:23Z","git_url":"git://github.com/wzmame/pictour.git","ssh_url":"git@github.com:wzmame/pictour.git","clone_url":"https://github.com/wzmame/pictour.git","svn_url":"https://github.com/wzmame/pictour","homepage":null,"size":143,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":8,"forks":1,"open_issues":8,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wzmame/pictour/pulls/19"},"html":{"href":"https://github.com/wzmame/pictour/pull/19"},"issue":{"href":"https://api.github.com/repos/wzmame/pictour/issues/19"},"comments":{"href":"https://api.github.com/repos/wzmame/pictour/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/wzmame/pictour/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/wzmame/pictour/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wzmame/pictour/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/wzmame/pictour/statuses/9daebeefeb67d22213e3714b20ae4392c82c120a"}}}}