{"action":"created","comment":{"url":"https://api.github.com/repos/dimagi/commcare-odk/pulls/comments/45553544","id":45553544,"diff_hunk":"@@ -0,0 +1,47 @@\n+package org.commcare.dalvik.activities;\r\n+\r\n+import android.annotation.TargetApi;\r\n+import android.os.Build;\r\n+import android.os.Bundle;\r\n+import android.view.View;\r\n+import android.view.ViewGroup;\r\n+import android.view.Window;\r\n+import android.webkit.WebView;\r\n+import android.widget.LinearLayout;\r\n+\r\n+import org.commcare.android.framework.CommCareActivity;\r\n+import org.commcare.android.util.InvalidStateException;\r\n+import org.commcare.android.view.GraphView;\r\n+import org.commcare.suite.model.graph.GraphData;\r\n+\r\n+/**\r\n+ * Full-screen view of a graph.\r\n+ *\r\n+ * Created by jschweers on 11/20/2015.\r\n+ */\r\n+public class GraphActivity extends CommCareActivity {\r\n+    private GraphView mView;\r\n+\r\n+    @TargetApi(Build.VERSION_CODES.HONEYCOMB)\r\n+    @Override\r\n+    protected void onCreate(Bundle savedInstanceState) {\r\n+        super.onCreate(savedInstanceState);\r\n+\r\n+        Bundle extras = getIntent().getExtras();\r\n+        String title = extras.getString(GraphView.TITLE);\r\n+        if (title == null) {\r\n+            requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n+        } else if (title.length() > 0) {\r\n+            setTitle(title);\r\n+        }\r\n+\r\n+        String html = extras.getString(GraphView.HTML);\r\n+        mView = new GraphView(this, title, true);\r\n+        try {\r\n+            WebView view = (WebView) mView.getView(html);\r\n+            setContentView(view);\r\n+        } catch (InvalidStateException e) {\r\n+            e.printStackTrace();\r","path":"app/src/org/commcare/dalvik/activities/GraphActivity.java","position":44,"original_position":44,"commit_id":"1bbf519526167d879a52f609be442fe5ffa0f8fb","original_commit_id":"1bbf519526167d879a52f609be442fe5ffa0f8fb","user":{"login":"phillipm","id":94817,"avatar_url":"https://avatars.githubusercontent.com/u/94817?v=3","gravatar_id":"","url":"https://api.github.com/users/phillipm","html_url":"https://github.com/phillipm","followers_url":"https://api.github.com/users/phillipm/followers","following_url":"https://api.github.com/users/phillipm/following{/other_user}","gists_url":"https://api.github.com/users/phillipm/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipm/subscriptions","organizations_url":"https://api.github.com/users/phillipm/orgs","repos_url":"https://api.github.com/users/phillipm/repos","events_url":"https://api.github.com/users/phillipm/events{/privacy}","received_events_url":"https://api.github.com/users/phillipm/received_events","type":"User","site_admin":false},"body":"Hmm, not sure, but it might be good to call `finish()` here, otherwise I suspect it just hang with a blank screen.","created_at":"2015-11-22T02:04:48Z","updated_at":"2015-11-22T02:04:48Z","html_url":"https://github.com/dimagi/commcare-odk/pull/837#discussion_r45553544","pull_request_url":"https://api.github.com/repos/dimagi/commcare-odk/pulls/837","_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcare-odk/pulls/comments/45553544"},"html":{"href":"https://github.com/dimagi/commcare-odk/pull/837#discussion_r45553544"},"pull_request":{"href":"https://api.github.com/repos/dimagi/commcare-odk/pulls/837"}}},"pull_request":{"url":"https://api.github.com/repos/dimagi/commcare-odk/pulls/837","id":51425627,"html_url":"https://github.com/dimagi/commcare-odk/pull/837","diff_url":"https://github.com/dimagi/commcare-odk/pull/837.diff","patch_url":"https://github.com/dimagi/commcare-odk/pull/837.patch","issue_url":"https://api.github.com/repos/dimagi/commcare-odk/issues/837","number":837,"state":"open","locked":false,"title":"full screen graphs","user":{"login":"orangejenny","id":1486591,"avatar_url":"https://avatars.githubusercontent.com/u/1486591?v=3","gravatar_id":"","url":"https://api.github.com/users/orangejenny","html_url":"https://github.com/orangejenny","followers_url":"https://api.github.com/users/orangejenny/followers","following_url":"https://api.github.com/users/orangejenny/following{/other_user}","gists_url":"https://api.github.com/users/orangejenny/gists{/gist_id}","starred_url":"https://api.github.com/users/orangejenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orangejenny/subscriptions","organizations_url":"https://api.github.com/users/orangejenny/orgs","repos_url":"https://api.github.com/users/orangejenny/repos","events_url":"https://api.github.com/users/orangejenny/events{/privacy}","received_events_url":"https://api.github.com/users/orangejenny/received_events","type":"User","site_admin":false},"body":"Support double-tap to see the graph full screen.\r\n\r\nIn full-screen mode, you can zoom and can touch a point to get a tooltip. This PR adds to series configuration `is-data` (default true) so users can specify that a given series should *not* be included in the tooltip (or the legend) (for example, the fake \"series\" used to create parto's red and yellow areas, or thresholds in general).\r\n\r\nIt's a bit finicky; the touch to tooltip isn't always responsive (it's a hover event in C3, so Android is translating the touch event to a mouseover). I'm using the built-in WebView zoom because C3's zoom capabilities are \"experimental\" (do not work well), but unfortunately that means that you're zooming in on the entire view, not just zooming in on the data while the axes stay put & re-scale themselves.\r\n\r\n![screenshot_2015-11-20-19-09-47](https://cloud.githubusercontent.com/assets/1486591/11315131/402ac94e-8fbb-11e5-885e-3e287b503a5c.png)\r\n![screenshot_2015-11-20-19-09-55](https://cloud.githubusercontent.com/assets/1486591/11315132/402b7628-8fbb-11e5-9794-46566b684663.png)\r\n","created_at":"2015-11-21T00:20:45Z","updated_at":"2015-11-22T02:04:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d01f626c1cd2a2d75552bb75153732ab663f2d9a","assignee":null,"milestone":{"url":"https://api.github.com/repos/dimagi/commcare-odk/milestones/5","html_url":"https://github.com/dimagi/commcare-odk/milestones/commcare_2.25","labels_url":"https://api.github.com/repos/dimagi/commcare-odk/milestones/5/labels","id":1368198,"number":5,"title":"commcare_2.25","description":null,"creator":{"login":"phillipm","id":94817,"avatar_url":"https://avatars.githubusercontent.com/u/94817?v=3","gravatar_id":"","url":"https://api.github.com/users/phillipm","html_url":"https://github.com/phillipm","followers_url":"https://api.github.com/users/phillipm/followers","following_url":"https://api.github.com/users/phillipm/following{/other_user}","gists_url":"https://api.github.com/users/phillipm/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipm/subscriptions","organizations_url":"https://api.github.com/users/phillipm/orgs","repos_url":"https://api.github.com/users/phillipm/repos","events_url":"https://api.github.com/users/phillipm/events{/privacy}","received_events_url":"https://api.github.com/users/phillipm/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":63,"state":"open","created_at":"2015-10-21T13:19:22Z","updated_at":"2015-11-22T01:59:16Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/dimagi/commcare-odk/pulls/837/commits","review_comments_url":"https://api.github.com/repos/dimagi/commcare-odk/pulls/837/comments","review_comment_url":"https://api.github.com/repos/dimagi/commcare-odk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dimagi/commcare-odk/issues/837/comments","statuses_url":"https://api.github.com/repos/dimagi/commcare-odk/statuses/1bbf519526167d879a52f609be442fe5ffa0f8fb","head":{"label":"dimagi:full-screen-graphs","ref":"full-screen-graphs","sha":"1bbf519526167d879a52f609be442fe5ffa0f8fb","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":20939877,"name":"commcare-odk","full_name":"dimagi/commcare-odk","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/commcare-odk","description":"The best open source form management tool in town","fork":false,"url":"https://api.github.com/repos/dimagi/commcare-odk","forks_url":"https://api.github.com/repos/dimagi/commcare-odk/forks","keys_url":"https://api.github.com/repos/dimagi/commcare-odk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcare-odk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcare-odk/teams","hooks_url":"https://api.github.com/repos/dimagi/commcare-odk/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcare-odk/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcare-odk/events","assignees_url":"https://api.github.com/repos/dimagi/commcare-odk/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcare-odk/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcare-odk/tags","blobs_url":"https://api.github.com/repos/dimagi/commcare-odk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcare-odk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcare-odk/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcare-odk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcare-odk/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcare-odk/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcare-odk/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcare-odk/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcare-odk/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcare-odk/subscription","commits_url":"https://api.github.com/repos/dimagi/commcare-odk/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcare-odk/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcare-odk/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcare-odk/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/commcare-odk/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcare-odk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcare-odk/merges","archive_url":"https://api.github.com/repos/dimagi/commcare-odk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcare-odk/downloads","issues_url":"https://api.github.com/repos/dimagi/commcare-odk/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcare-odk/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcare-odk/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcare-odk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcare-odk/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcare-odk/releases{/id}","created_at":"2014-06-17T21:17:26Z","updated_at":"2015-11-19T22:50:57Z","pushed_at":"2015-11-22T01:59:18Z","git_url":"git://github.com/dimagi/commcare-odk.git","ssh_url":"git@github.com:dimagi/commcare-odk.git","clone_url":"https://github.com/dimagi/commcare-odk.git","svn_url":"https://github.com/dimagi/commcare-odk","homepage":"https://play.google.com/store/apps/details?id=org.commcare.dalvik&hl=en","size":63430,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":17,"forks":8,"open_issues":17,"watchers":3,"default_branch":"master"}},"base":{"label":"dimagi:graphing","ref":"graphing","sha":"16f549652ee12e129438298a35e8093b87bd2c0d","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":20939877,"name":"commcare-odk","full_name":"dimagi/commcare-odk","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/commcare-odk","description":"The best open source form management tool in town","fork":false,"url":"https://api.github.com/repos/dimagi/commcare-odk","forks_url":"https://api.github.com/repos/dimagi/commcare-odk/forks","keys_url":"https://api.github.com/repos/dimagi/commcare-odk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcare-odk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcare-odk/teams","hooks_url":"https://api.github.com/repos/dimagi/commcare-odk/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcare-odk/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcare-odk/events","assignees_url":"https://api.github.com/repos/dimagi/commcare-odk/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcare-odk/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcare-odk/tags","blobs_url":"https://api.github.com/repos/dimagi/commcare-odk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcare-odk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcare-odk/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcare-odk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcare-odk/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcare-odk/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcare-odk/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcare-odk/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcare-odk/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcare-odk/subscription","commits_url":"https://api.github.com/repos/dimagi/commcare-odk/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcare-odk/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcare-odk/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcare-odk/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/commcare-odk/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcare-odk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcare-odk/merges","archive_url":"https://api.github.com/repos/dimagi/commcare-odk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcare-odk/downloads","issues_url":"https://api.github.com/repos/dimagi/commcare-odk/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcare-odk/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcare-odk/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcare-odk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcare-odk/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcare-odk/releases{/id}","created_at":"2014-06-17T21:17:26Z","updated_at":"2015-11-19T22:50:57Z","pushed_at":"2015-11-22T01:59:18Z","git_url":"git://github.com/dimagi/commcare-odk.git","ssh_url":"git@github.com:dimagi/commcare-odk.git","clone_url":"https://github.com/dimagi/commcare-odk.git","svn_url":"https://github.com/dimagi/commcare-odk","homepage":"https://play.google.com/store/apps/details?id=org.commcare.dalvik&hl=en","size":63430,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":17,"forks":8,"open_issues":17,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcare-odk/pulls/837"},"html":{"href":"https://github.com/dimagi/commcare-odk/pull/837"},"issue":{"href":"https://api.github.com/repos/dimagi/commcare-odk/issues/837"},"comments":{"href":"https://api.github.com/repos/dimagi/commcare-odk/issues/837/comments"},"review_comments":{"href":"https://api.github.com/repos/dimagi/commcare-odk/pulls/837/comments"},"review_comment":{"href":"https://api.github.com/repos/dimagi/commcare-odk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dimagi/commcare-odk/pulls/837/commits"},"statuses":{"href":"https://api.github.com/repos/dimagi/commcare-odk/statuses/1bbf519526167d879a52f609be442fe5ffa0f8fb"}}}}