{"action":"created","comment":{"url":"https://api.github.com/repos/MobileApplicationsClub/ARD/pulls/comments/119563956","pull_request_review_id":41453341,"id":119563956,"diff_hunk":"@@ -0,0 +1,159 @@\n+package in.ac.bits_pilani.goa.ard.activities;\n+\n+import android.content.Context;\n+import android.content.SharedPreferences;\n+import android.os.Bundle;\n+import android.support.v7.app.AppCompatActivity;\n+import android.support.v7.widget.Toolbar;\n+import android.text.Html;\n+import android.util.Log;\n+import android.widget.ImageView;\n+import android.widget.TextView;\n+\n+import com.bumptech.glide.Glide;\n+import com.bumptech.glide.load.engine.DiskCacheStrategy;\n+import com.google.firebase.database.DataSnapshot;\n+import com.google.firebase.database.DatabaseError;\n+import com.google.firebase.database.DatabaseReference;\n+import com.google.firebase.database.FirebaseDatabase;\n+import com.google.firebase.database.ValueEventListener;\n+\n+import butterknife.BindView;\n+import butterknife.ButterKnife;\n+import in.ac.bits_pilani.goa.ard.R;\n+import in.ac.bits_pilani.goa.ard.utils.AHC;\n+\n+/**\n+ * AboutMac class.\n+ * @author Aayush\n+ * @version 1.0.\n+ */\n+\n+public class AboutMAC extends AppCompatActivity {\n+\n+    /**\n+     * About Mac Text.\n+     */\n+    @BindView(R.id.about_mac_text)\n+    TextView textView;\n+\n+    /**\n+     * About Mac Image.\n+     */\n+    @BindView(R.id.about_mac_image)\n+    ImageView imageView;\n+\n+    /**\n+     * About Mac Toolbar.\n+     */\n+    @BindView(R.id.toolbar_about_mac)\n+    Toolbar toolbar;\n+\n+    /**\n+     * Database Reference.\n+     */\n+    DatabaseReference databaseReference;\n+\n+    /**\n+     * Vale event listener.\n+     */\n+    ValueEventListener listener;\n+\n+    /**\n+     * Sharedpreferences.\n+     */\n+    SharedPreferences sharedPreferences;\n+\n+    /**\n+     * String html.\n+     */\n+    String html;\n+\n+    /**\n+     * String url.\n+     */\n+    String url;\n+\n+    /**\n+     * String shtml.\n+     */\n+    String shtml = \"html\";\n+\n+    /**\n+     * String surl.\n+     */\n+    String surl = \"imageUrl\";\n+\n+    /**\n+     * Float magicnumber.\n+     */\n+    float magicnumber = 0.5f;\n+\n+    /**\n+     * constructor.\n+     */\n+    public AboutMAC(){\n+\n+    }\n+\n+    @Override\n+    protected void onCreate(final Bundle savedInstanceState) {\n+        super.onCreate(savedInstanceState);\n+        setContentView(R.layout.activity_about_mac);\n+        ButterKnife.bind(this);\n+        setSupportActionBar(toolbar);\n+        getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n+    }\n+\n+    @Override\n+    protected void onStart() {\n+        super.onStart();\n+        sharedPreferences = getSharedPreferences(\"aboutMAC\", Context.MODE_PRIVATE);\n+        html = sharedPreferences.getString(shtml, \"\");\n+        url = sharedPreferences.getString(surl, \"\");\n+        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {\n+            textView.setText(Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY));\n+        } else {\n+            textView.setText(Html.fromHtml(html));\n+        }\n+        Glide.with(getApplicationContext()).load(url)\n+                .thumbnail(magicnumber)\n+                .crossFade()\n+                .diskCacheStrategy(DiskCacheStrategy.ALL)\n+                .into(imageView);\n+        databaseReference = FirebaseDatabase.getInstance().getReference().child(AHC.FDR_ABOUT_MAC);\n+        listener = databaseReference.addValueEventListener(new ValueEventListener() {\n+            @Override\n+            public void onDataChange(final DataSnapshot dataSnapshot) {\n+                html = dataSnapshot.child(shtml).getValue(String.class);\n+                url = dataSnapshot.child(surl).getValue(String.class);\n+                if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {\n+                    textView.setText(Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY));\n+                } else {\n+                    textView.setText(Html.fromHtml(html));\n+                }\n+                Glide.with(getApplicationContext()).load(url)\n+                        .thumbnail(magicnumber)\n+                        .crossFade()\n+                        .diskCacheStrategy(DiskCacheStrategy.ALL)\n+                        .into(imageView);\n+                final SharedPreferences.Editor editor = sharedPreferences.edit();\n+                editor.putString(shtml, html);\n+                editor.putString(surl, url);\n+                editor.apply();\n+            }\n+\n+            @Override\n+            public void onCancelled(final DatabaseError databaseError) {","path":"app/src/main/java/in/ac/bits_pilani/goa/ard/activities/AboutMAC.java","position":147,"original_position":147,"commit_id":"0d4b2afebb13f7eab223ab7862301b9fc5af3cb7","original_commit_id":"0d4b2afebb13f7eab223ab7862301b9fc5af3cb7","user":{"login":"kukreja-vikramaditya","id":15936912,"avatar_url":"https://avatars0.githubusercontent.com/u/15936912?v=3","gravatar_id":"","url":"https://api.github.com/users/kukreja-vikramaditya","html_url":"https://github.com/kukreja-vikramaditya","followers_url":"https://api.github.com/users/kukreja-vikramaditya/followers","following_url":"https://api.github.com/users/kukreja-vikramaditya/following{/other_user}","gists_url":"https://api.github.com/users/kukreja-vikramaditya/gists{/gist_id}","starred_url":"https://api.github.com/users/kukreja-vikramaditya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kukreja-vikramaditya/subscriptions","organizations_url":"https://api.github.com/users/kukreja-vikramaditya/orgs","repos_url":"https://api.github.com/users/kukreja-vikramaditya/repos","events_url":"https://api.github.com/users/kukreja-vikramaditya/events{/privacy}","received_events_url":"https://api.github.com/users/kukreja-vikramaditya/received_events","type":"User","site_admin":false},"body":"create a separate tag for this class.. see how it done elsewhere in the project","created_at":"2017-06-01T09:09:55Z","updated_at":"2017-06-01T09:17:13Z","html_url":"https://github.com/MobileApplicationsClub/ARD/pull/76#discussion_r119563956","pull_request_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/pulls/76","_links":{"self":{"href":"https://api.github.com/repos/MobileApplicationsClub/ARD/pulls/comments/119563956"},"html":{"href":"https://github.com/MobileApplicationsClub/ARD/pull/76#discussion_r119563956"},"pull_request":{"href":"https://api.github.com/repos/MobileApplicationsClub/ARD/pulls/76"}}},"pull_request":{"url":"https://api.github.com/repos/MobileApplicationsClub/ARD/pulls/76","id":123428954,"html_url":"https://github.com/MobileApplicationsClub/ARD/pull/76","diff_url":"https://github.com/MobileApplicationsClub/ARD/pull/76.diff","patch_url":"https://github.com/MobileApplicationsClub/ARD/pull/76.patch","issue_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/issues/76","number":76,"state":"open","locked":false,"title":"#Issue 53 Added About Mac activity","user":{"login":"aayushsoni10","id":21083770,"avatar_url":"https://avatars1.githubusercontent.com/u/21083770?v=3","gravatar_id":"","url":"https://api.github.com/users/aayushsoni10","html_url":"https://github.com/aayushsoni10","followers_url":"https://api.github.com/users/aayushsoni10/followers","following_url":"https://api.github.com/users/aayushsoni10/following{/other_user}","gists_url":"https://api.github.com/users/aayushsoni10/gists{/gist_id}","starred_url":"https://api.github.com/users/aayushsoni10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aayushsoni10/subscriptions","organizations_url":"https://api.github.com/users/aayushsoni10/orgs","repos_url":"https://api.github.com/users/aayushsoni10/repos","events_url":"https://api.github.com/users/aayushsoni10/events{/privacy}","received_events_url":"https://api.github.com/users/aayushsoni10/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-06-01T06:50:10Z","updated_at":"2017-06-01T09:17:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2312c6f2b7901513ad65053aa7e7fcd12166341d","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/pulls/76/commits","review_comments_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/pulls/76/comments","review_comment_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/issues/76/comments","statuses_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/statuses/0d4b2afebb13f7eab223ab7862301b9fc5af3cb7","head":{"label":"aayushsoni10:about","ref":"about","sha":"0d4b2afebb13f7eab223ab7862301b9fc5af3cb7","user":{"login":"aayushsoni10","id":21083770,"avatar_url":"https://avatars1.githubusercontent.com/u/21083770?v=3","gravatar_id":"","url":"https://api.github.com/users/aayushsoni10","html_url":"https://github.com/aayushsoni10","followers_url":"https://api.github.com/users/aayushsoni10/followers","following_url":"https://api.github.com/users/aayushsoni10/following{/other_user}","gists_url":"https://api.github.com/users/aayushsoni10/gists{/gist_id}","starred_url":"https://api.github.com/users/aayushsoni10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aayushsoni10/subscriptions","organizations_url":"https://api.github.com/users/aayushsoni10/orgs","repos_url":"https://api.github.com/users/aayushsoni10/repos","events_url":"https://api.github.com/users/aayushsoni10/events{/privacy}","received_events_url":"https://api.github.com/users/aayushsoni10/received_events","type":"User","site_admin":false},"repo":{"id":93023946,"name":"ARD","full_name":"aayushsoni10/ARD","owner":{"login":"aayushsoni10","id":21083770,"avatar_url":"https://avatars1.githubusercontent.com/u/21083770?v=3","gravatar_id":"","url":"https://api.github.com/users/aayushsoni10","html_url":"https://github.com/aayushsoni10","followers_url":"https://api.github.com/users/aayushsoni10/followers","following_url":"https://api.github.com/users/aayushsoni10/following{/other_user}","gists_url":"https://api.github.com/users/aayushsoni10/gists{/gist_id}","starred_url":"https://api.github.com/users/aayushsoni10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aayushsoni10/subscriptions","organizations_url":"https://api.github.com/users/aayushsoni10/orgs","repos_url":"https://api.github.com/users/aayushsoni10/repos","events_url":"https://api.github.com/users/aayushsoni10/events{/privacy}","received_events_url":"https://api.github.com/users/aayushsoni10/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aayushsoni10/ARD","description":"ARD portal for students","fork":true,"url":"https://api.github.com/repos/aayushsoni10/ARD","forks_url":"https://api.github.com/repos/aayushsoni10/ARD/forks","keys_url":"https://api.github.com/repos/aayushsoni10/ARD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aayushsoni10/ARD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aayushsoni10/ARD/teams","hooks_url":"https://api.github.com/repos/aayushsoni10/ARD/hooks","issue_events_url":"https://api.github.com/repos/aayushsoni10/ARD/issues/events{/number}","events_url":"https://api.github.com/repos/aayushsoni10/ARD/events","assignees_url":"https://api.github.com/repos/aayushsoni10/ARD/assignees{/user}","branches_url":"https://api.github.com/repos/aayushsoni10/ARD/branches{/branch}","tags_url":"https://api.github.com/repos/aayushsoni10/ARD/tags","blobs_url":"https://api.github.com/repos/aayushsoni10/ARD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aayushsoni10/ARD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aayushsoni10/ARD/git/refs{/sha}","trees_url":"https://api.github.com/repos/aayushsoni10/ARD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aayushsoni10/ARD/statuses/{sha}","languages_url":"https://api.github.com/repos/aayushsoni10/ARD/languages","stargazers_url":"https://api.github.com/repos/aayushsoni10/ARD/stargazers","contributors_url":"https://api.github.com/repos/aayushsoni10/ARD/contributors","subscribers_url":"https://api.github.com/repos/aayushsoni10/ARD/subscribers","subscription_url":"https://api.github.com/repos/aayushsoni10/ARD/subscription","commits_url":"https://api.github.com/repos/aayushsoni10/ARD/commits{/sha}","git_commits_url":"https://api.github.com/repos/aayushsoni10/ARD/git/commits{/sha}","comments_url":"https://api.github.com/repos/aayushsoni10/ARD/comments{/number}","issue_comment_url":"https://api.github.com/repos/aayushsoni10/ARD/issues/comments{/number}","contents_url":"https://api.github.com/repos/aayushsoni10/ARD/contents/{+path}","compare_url":"https://api.github.com/repos/aayushsoni10/ARD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aayushsoni10/ARD/merges","archive_url":"https://api.github.com/repos/aayushsoni10/ARD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aayushsoni10/ARD/downloads","issues_url":"https://api.github.com/repos/aayushsoni10/ARD/issues{/number}","pulls_url":"https://api.github.com/repos/aayushsoni10/ARD/pulls{/number}","milestones_url":"https://api.github.com/repos/aayushsoni10/ARD/milestones{/number}","notifications_url":"https://api.github.com/repos/aayushsoni10/ARD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aayushsoni10/ARD/labels{/name}","releases_url":"https://api.github.com/repos/aayushsoni10/ARD/releases{/id}","deployments_url":"https://api.github.com/repos/aayushsoni10/ARD/deployments","created_at":"2017-06-01T06:29:38Z","updated_at":"2017-06-01T06:29:40Z","pushed_at":"2017-06-01T07:35:00Z","git_url":"git://github.com/aayushsoni10/ARD.git","ssh_url":"git@github.com:aayushsoni10/ARD.git","clone_url":"https://github.com/aayushsoni10/ARD.git","svn_url":"https://github.com/aayushsoni10/ARD","homepage":"http://www.bits-pilani.ac.in/goa/ard/ard","size":189,"stargazers_count":0,"watchers_count":0,"language":"XSLT","has_issues":false,"has_projects":true,"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":"MobileApplicationsClub:master","ref":"master","sha":"dd6017963dfefb4e7dcce11edd40e55f970aa8fa","user":{"login":"MobileApplicationsClub","id":6451546,"avatar_url":"https://avatars1.githubusercontent.com/u/6451546?v=3","gravatar_id":"","url":"https://api.github.com/users/MobileApplicationsClub","html_url":"https://github.com/MobileApplicationsClub","followers_url":"https://api.github.com/users/MobileApplicationsClub/followers","following_url":"https://api.github.com/users/MobileApplicationsClub/following{/other_user}","gists_url":"https://api.github.com/users/MobileApplicationsClub/gists{/gist_id}","starred_url":"https://api.github.com/users/MobileApplicationsClub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MobileApplicationsClub/subscriptions","organizations_url":"https://api.github.com/users/MobileApplicationsClub/orgs","repos_url":"https://api.github.com/users/MobileApplicationsClub/repos","events_url":"https://api.github.com/users/MobileApplicationsClub/events{/privacy}","received_events_url":"https://api.github.com/users/MobileApplicationsClub/received_events","type":"Organization","site_admin":false},"repo":{"id":87795883,"name":"ARD","full_name":"MobileApplicationsClub/ARD","owner":{"login":"MobileApplicationsClub","id":6451546,"avatar_url":"https://avatars1.githubusercontent.com/u/6451546?v=3","gravatar_id":"","url":"https://api.github.com/users/MobileApplicationsClub","html_url":"https://github.com/MobileApplicationsClub","followers_url":"https://api.github.com/users/MobileApplicationsClub/followers","following_url":"https://api.github.com/users/MobileApplicationsClub/following{/other_user}","gists_url":"https://api.github.com/users/MobileApplicationsClub/gists{/gist_id}","starred_url":"https://api.github.com/users/MobileApplicationsClub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MobileApplicationsClub/subscriptions","organizations_url":"https://api.github.com/users/MobileApplicationsClub/orgs","repos_url":"https://api.github.com/users/MobileApplicationsClub/repos","events_url":"https://api.github.com/users/MobileApplicationsClub/events{/privacy}","received_events_url":"https://api.github.com/users/MobileApplicationsClub/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MobileApplicationsClub/ARD","description":"ARD portal for students","fork":false,"url":"https://api.github.com/repos/MobileApplicationsClub/ARD","forks_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/forks","keys_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/teams","hooks_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/hooks","issue_events_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/issues/events{/number}","events_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/events","assignees_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/assignees{/user}","branches_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/branches{/branch}","tags_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/tags","blobs_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/git/refs{/sha}","trees_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/statuses/{sha}","languages_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/languages","stargazers_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/stargazers","contributors_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/contributors","subscribers_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/subscribers","subscription_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/subscription","commits_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/commits{/sha}","git_commits_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/git/commits{/sha}","comments_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/comments{/number}","issue_comment_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/issues/comments{/number}","contents_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/contents/{+path}","compare_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/merges","archive_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/downloads","issues_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/issues{/number}","pulls_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/pulls{/number}","milestones_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/milestones{/number}","notifications_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/labels{/name}","releases_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/releases{/id}","deployments_url":"https://api.github.com/repos/MobileApplicationsClub/ARD/deployments","created_at":"2017-04-10T09:57:45Z","updated_at":"2017-05-31T08:04:11Z","pushed_at":"2017-06-01T07:35:02Z","git_url":"git://github.com/MobileApplicationsClub/ARD.git","ssh_url":"git@github.com:MobileApplicationsClub/ARD.git","clone_url":"https://github.com/MobileApplicationsClub/ARD.git","svn_url":"https://github.com/MobileApplicationsClub/ARD","homepage":"http://www.bits-pilani.ac.in/goa/ard/ard","size":177,"stargazers_count":1,"watchers_count":1,"language":"XSLT","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":17,"forks":4,"open_issues":17,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MobileApplicationsClub/ARD/pulls/76"},"html":{"href":"https://github.com/MobileApplicationsClub/ARD/pull/76"},"issue":{"href":"https://api.github.com/repos/MobileApplicationsClub/ARD/issues/76"},"comments":{"href":"https://api.github.com/repos/MobileApplicationsClub/ARD/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/MobileApplicationsClub/ARD/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/MobileApplicationsClub/ARD/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MobileApplicationsClub/ARD/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/MobileApplicationsClub/ARD/statuses/0d4b2afebb13f7eab223ab7862301b9fc5af3cb7"}}}}
{"actor":{"display_login":"kukreja-vikramaditya"}}