{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-app-android/pulls/comments/79684230","id":79684230,"diff_hunk":"@@ -191,4 +194,27 @@ public static void setEndorsedState(@NonNull TextView target,\n         }\n \n     }\n+\n+    /**\n+     * Renders hyperlinks in the given html to clickable items when applied to the given TextView.\n+     *\n+     * @param textView The textView which will render the given html.\n+     * @param html     The HTML to apply.\n+     */\n+    public static void linkifyTextView(@NonNull TextView textView, @NonNull String html) {\n+        Spanned spannedHtml = (Spanned) DiscussionTextUtils.parseHtml(html);\n+        Object[] urlSpans = spannedHtml.getSpans(0, spannedHtml.length(), URLSpan.class);\n+        textView.setAutoLinkMask(Linkify.ALL);\n+        textView.setMovementMethod(LinkMovementMethod.getInstance());\n+        textView.setText(spannedHtml);\n+\n+        SpannableString tvText = (SpannableString) textView.getText();","path":"VideoLocker/src/main/java/org/edx/mobile/discussion/DiscussionTextUtils.java","position":30,"original_position":30,"commit_id":"fad764d7626ec076d8c550226a0a4387f0c0244d","original_commit_id":"fad764d7626ec076d8c550226a0a4387f0c0244d","user":{"login":"1zaman","id":4244109,"avatar_url":"https://avatars.githubusercontent.com/u/4244109?v=3","gravatar_id":"","url":"https://api.github.com/users/1zaman","html_url":"https://github.com/1zaman","followers_url":"https://api.github.com/users/1zaman/followers","following_url":"https://api.github.com/users/1zaman/following{/other_user}","gists_url":"https://api.github.com/users/1zaman/gists{/gist_id}","starred_url":"https://api.github.com/users/1zaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1zaman/subscriptions","organizations_url":"https://api.github.com/users/1zaman/orgs","repos_url":"https://api.github.com/users/1zaman/repos","events_url":"https://api.github.com/users/1zaman/events{/privacy}","received_events_url":"https://api.github.com/users/1zaman/received_events","type":"User","site_admin":false},"body":"Maybe rename `tvText` to `viewText` or something? I don't like abbreviations in variable names unless they're easily understandable.","created_at":"2016-09-20T18:46:09Z","updated_at":"2016-09-20T18:53:02Z","html_url":"https://github.com/edx/edx-app-android/pull/819#discussion_r79684230","pull_request_url":"https://api.github.com/repos/edx/edx-app-android/pulls/819","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/comments/79684230"},"html":{"href":"https://github.com/edx/edx-app-android/pull/819#discussion_r79684230"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/819"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-app-android/pulls/819","id":84082988,"html_url":"https://github.com/edx/edx-app-android/pull/819","diff_url":"https://github.com/edx/edx-app-android/pull/819.diff","patch_url":"https://github.com/edx/edx-app-android/pull/819.patch","issue_url":"https://api.github.com/repos/edx/edx-app-android/issues/819","number":819,"state":"open","locked":false,"title":"Hyperlinks made clickable in discussions","user":{"login":"miankhalid","id":1710804,"avatar_url":"https://avatars.githubusercontent.com/u/1710804?v=3","gravatar_id":"","url":"https://api.github.com/users/miankhalid","html_url":"https://github.com/miankhalid","followers_url":"https://api.github.com/users/miankhalid/followers","following_url":"https://api.github.com/users/miankhalid/following{/other_user}","gists_url":"https://api.github.com/users/miankhalid/gists{/gist_id}","starred_url":"https://api.github.com/users/miankhalid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miankhalid/subscriptions","organizations_url":"https://api.github.com/users/miankhalid/orgs","repos_url":"https://api.github.com/users/miankhalid/repos","events_url":"https://api.github.com/users/miankhalid/events{/privacy}","received_events_url":"https://api.github.com/users/miankhalid/received_events","type":"User","site_admin":false},"body":"### Description\r\n\r\n[MA-2485](https://openedx.atlassian.net/browse/MA-2485)\r\n\r\nHyperlinks in discussion threads, responses and comments are now tappable and open in browser on tap.\r\n\r\n### Testing\r\n\r\n1. Open a sandbox's lms.\r\n2. Add a thread with hyperlink in it.\r\n3. Add a response to that thread with hyperlink in it.\r\n4. Add a comment to that response with hyperlink in it.\r\n5. All hyperlinks should appear blue & underlined and open in device's browser upon tap.\r\n\r\n### Reviewers\r\nIf you've been tagged for review, please check your corresponding box once you've given the :+1:.\r\n- [x] Code review: @1zaman \r\n- [ ] Code review: @mdinino\r\n","created_at":"2016-09-06T08:49:24Z","updated_at":"2016-09-20T18:53:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a6658e2bd33a6210ba8c6b89547dd96cc2c1739","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-app-android/pulls/819/commits","review_comments_url":"https://api.github.com/repos/edx/edx-app-android/pulls/819/comments","review_comment_url":"https://api.github.com/repos/edx/edx-app-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-app-android/issues/819/comments","statuses_url":"https://api.github.com/repos/edx/edx-app-android/statuses/fad764d7626ec076d8c550226a0a4387f0c0244d","head":{"label":"edx:khalid/MA-2485","ref":"khalid/MA-2485","sha":"fad764d7626ec076d8c550226a0a4387f0c0244d","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":29251742,"name":"edx-app-android","full_name":"edx/edx-app-android","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-app-android","description":"","fork":false,"url":"https://api.github.com/repos/edx/edx-app-android","forks_url":"https://api.github.com/repos/edx/edx-app-android/forks","keys_url":"https://api.github.com/repos/edx/edx-app-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-app-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-app-android/teams","hooks_url":"https://api.github.com/repos/edx/edx-app-android/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-app-android/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-app-android/events","assignees_url":"https://api.github.com/repos/edx/edx-app-android/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-app-android/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-app-android/tags","blobs_url":"https://api.github.com/repos/edx/edx-app-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-app-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-app-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-app-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-app-android/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-app-android/languages","stargazers_url":"https://api.github.com/repos/edx/edx-app-android/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-app-android/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-app-android/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-app-android/subscription","commits_url":"https://api.github.com/repos/edx/edx-app-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-app-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-app-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-app-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-app-android/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-app-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-app-android/merges","archive_url":"https://api.github.com/repos/edx/edx-app-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-app-android/downloads","issues_url":"https://api.github.com/repos/edx/edx-app-android/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-app-android/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-app-android/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-app-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-app-android/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-app-android/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-app-android/deployments","created_at":"2015-01-14T15:49:47Z","updated_at":"2016-09-16T14:27:36Z","pushed_at":"2016-09-20T18:48:27Z","git_url":"git://github.com/edx/edx-app-android.git","ssh_url":"git@github.com:edx/edx-app-android.git","clone_url":"https://github.com/edx/edx-app-android.git","svn_url":"https://github.com/edx/edx-app-android","homepage":null,"size":24076,"stargazers_count":95,"watchers_count":95,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":98,"mirror_url":null,"open_issues_count":12,"forks":98,"open_issues":12,"watchers":95,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"dcc5a98c47970bb5e08c75ef0f9b894d5616e520","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":29251742,"name":"edx-app-android","full_name":"edx/edx-app-android","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-app-android","description":"","fork":false,"url":"https://api.github.com/repos/edx/edx-app-android","forks_url":"https://api.github.com/repos/edx/edx-app-android/forks","keys_url":"https://api.github.com/repos/edx/edx-app-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-app-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-app-android/teams","hooks_url":"https://api.github.com/repos/edx/edx-app-android/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-app-android/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-app-android/events","assignees_url":"https://api.github.com/repos/edx/edx-app-android/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-app-android/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-app-android/tags","blobs_url":"https://api.github.com/repos/edx/edx-app-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-app-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-app-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-app-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-app-android/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-app-android/languages","stargazers_url":"https://api.github.com/repos/edx/edx-app-android/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-app-android/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-app-android/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-app-android/subscription","commits_url":"https://api.github.com/repos/edx/edx-app-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-app-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-app-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-app-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-app-android/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-app-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-app-android/merges","archive_url":"https://api.github.com/repos/edx/edx-app-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-app-android/downloads","issues_url":"https://api.github.com/repos/edx/edx-app-android/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-app-android/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-app-android/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-app-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-app-android/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-app-android/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-app-android/deployments","created_at":"2015-01-14T15:49:47Z","updated_at":"2016-09-16T14:27:36Z","pushed_at":"2016-09-20T18:48:27Z","git_url":"git://github.com/edx/edx-app-android.git","ssh_url":"git@github.com:edx/edx-app-android.git","clone_url":"https://github.com/edx/edx-app-android.git","svn_url":"https://github.com/edx/edx-app-android","homepage":null,"size":24076,"stargazers_count":95,"watchers_count":95,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":98,"mirror_url":null,"open_issues_count":12,"forks":98,"open_issues":12,"watchers":95,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/819"},"html":{"href":"https://github.com/edx/edx-app-android/pull/819"},"issue":{"href":"https://api.github.com/repos/edx/edx-app-android/issues/819"},"comments":{"href":"https://api.github.com/repos/edx/edx-app-android/issues/819/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/819/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-app-android/pulls/819/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-app-android/statuses/fad764d7626ec076d8c550226a0a4387f0c0244d"}}}}
{"actor":{"display_login":"1zaman"}}