{"action":"created","comment":{"url":"https://api.github.com/repos/MorANDarty/androidHomework/pulls/comments/232802467","pull_request_review_id":174081440,"id":232802467,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjgwMjQ2Nw==","diff_hunk":"@@ -0,0 +1,127 @@\n+package com.shgbievigmai.androidhomework;\n+\n+import android.content.ComponentName;\n+import android.content.Context;\n+import android.content.Intent;\n+import android.content.ServiceConnection;\n+import android.content.SharedPreferences;\n+import android.os.Bundle;\n+import android.os.IBinder;\n+import android.preference.PreferenceManager;\n+import android.support.v7.app.AppCompatActivity;\n+import android.view.View;\n+import android.widget.Button;\n+import android.widget.ImageView;\n+import android.widget.TextView;\n+\n+import java.util.ArrayList;\n+\n+public class DescriptionActivity extends AppCompatActivity implements CallbackItem, ServiceConnection {\n+\n+    ImageView ivAlbum;\n+    Button btnPrevious, btnNext, btnPlay, btnPause;\n+    TextView tvTitle, tvArtist;\n+\n+    private MusicService musicSrv;\n+    private int index;\n+    private ArrayList<Song> songs;\n+\n+    @Override\n+    protected void onCreate(Bundle savedInstanceState) {\n+        super.onCreate(savedInstanceState);\n+        setContentView(R.layout.activity_description);\n+        ivAlbum = findViewById(R.id.album_picture_iv);\n+        btnPrevious = findViewById(R.id.left);\n+        btnNext = findViewById(R.id.right);\n+        btnPause = findViewById(R.id.pause);\n+        btnPlay = findViewById(R.id.play);\n+        tvTitle = findViewById(R.id.tv_title);\n+        tvArtist = findViewById(R.id.tv_artist);\n+\n+        index = getIntent().getIntExtra(\"id\", 0);\n+        songs = MainActivity.getSongList();\n+\n+\n+        btnPrevious.setOnClickListener(new View.OnClickListener() {\n+            @Override\n+            public void onClick(View view) {\n+                index--;\n+                if (index == -1) index = songs.size();\n+                musicSrv.playPrevious();\n+            }\n+        });\n+\n+        btnNext.setOnClickListener(new View.OnClickListener() {\n+            @Override\n+            public void onClick(View view) {\n+                index++;\n+                if (index == songs.size()) index = 0;\n+                musicSrv.playNext();\n+            }\n+        });\n+\n+        btnPlay.setOnClickListener(new View.OnClickListener() {\n+            @Override\n+            public void onClick(View view) {\n+                musicSrv.play();\n+            }\n+        });\n+\n+        btnPause.setOnClickListener(new View.OnClickListener() {\n+            @Override\n+            public void onClick(View view) {\n+                musicSrv.pause();\n+            }\n+        });\n+        SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);\n+        String currentTheme = sharedPref.getString(\"current_theme\", \"First\");","path":"app/src/main/java/com/shgbievigmai/androidhomework/DescriptionActivity.java","position":77,"original_position":77,"commit_id":"3a010ac7eed6a50883409f496c0dbafa4f93783d","original_commit_id":"3a010ac7eed6a50883409f496c0dbafa4f93783d","user":{"login":"NailShaykhrazievItis","id":36369179,"node_id":"MDQ6VXNlcjM2MzY5MTc5","avatar_url":"https://avatars0.githubusercontent.com/u/36369179?v=4","gravatar_id":"","url":"https://api.github.com/users/NailShaykhrazievItis","html_url":"https://github.com/NailShaykhrazievItis","followers_url":"https://api.github.com/users/NailShaykhrazievItis/followers","following_url":"https://api.github.com/users/NailShaykhrazievItis/following{/other_user}","gists_url":"https://api.github.com/users/NailShaykhrazievItis/gists{/gist_id}","starred_url":"https://api.github.com/users/NailShaykhrazievItis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NailShaykhrazievItis/subscriptions","organizations_url":"https://api.github.com/users/NailShaykhrazievItis/orgs","repos_url":"https://api.github.com/users/NailShaykhrazievItis/repos","events_url":"https://api.github.com/users/NailShaykhrazievItis/events{/privacy}","received_events_url":"https://api.github.com/users/NailShaykhrazievItis/received_events","type":"User","site_admin":false},"body":"Я бы вынес это в отдельный метод, слишком флоу различен","created_at":"2018-11-12T20:33:23Z","updated_at":"2018-11-12T20:44:06Z","html_url":"https://github.com/MorANDarty/androidHomework/pull/5#discussion_r232802467","pull_request_url":"https://api.github.com/repos/MorANDarty/androidHomework/pulls/5","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/MorANDarty/androidHomework/pulls/comments/232802467"},"html":{"href":"https://github.com/MorANDarty/androidHomework/pull/5#discussion_r232802467"},"pull_request":{"href":"https://api.github.com/repos/MorANDarty/androidHomework/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/MorANDarty/androidHomework/pulls/5","id":230218986,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMjE4OTg2","html_url":"https://github.com/MorANDarty/androidHomework/pull/5","diff_url":"https://github.com/MorANDarty/androidHomework/pull/5.diff","patch_url":"https://github.com/MorANDarty/androidHomework/pull/5.patch","issue_url":"https://api.github.com/repos/MorANDarty/androidHomework/issues/5","number":5,"state":"open","locked":false,"title":"Tasks/music player","user":{"login":"MorANDarty","id":31700845,"node_id":"MDQ6VXNlcjMxNzAwODQ1","avatar_url":"https://avatars0.githubusercontent.com/u/31700845?v=4","gravatar_id":"","url":"https://api.github.com/users/MorANDarty","html_url":"https://github.com/MorANDarty","followers_url":"https://api.github.com/users/MorANDarty/followers","following_url":"https://api.github.com/users/MorANDarty/following{/other_user}","gists_url":"https://api.github.com/users/MorANDarty/gists{/gist_id}","starred_url":"https://api.github.com/users/MorANDarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorANDarty/subscriptions","organizations_url":"https://api.github.com/users/MorANDarty/orgs","repos_url":"https://api.github.com/users/MorANDarty/repos","events_url":"https://api.github.com/users/MorANDarty/events{/privacy}","received_events_url":"https://api.github.com/users/MorANDarty/received_events","type":"User","site_admin":false},"body":"Слепил какашечку так скозатб\r\n\r\n![image](https://user-images.githubusercontent.com/31700845/48365510-2ee80d80-e6bc-11e8-8a8d-b406bc2f0695.png)\r\n![default](https://user-images.githubusercontent.com/31700845/48365699-b2a1fa00-e6bc-11e8-9ccf-e9b471e8bc83.png)\r\n\r\n\r\n","created_at":"2018-11-12T17:51:22Z","updated_at":"2018-11-12T20:44:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e404a63dd4862f3b72d6e6e07ec82089f640ffc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/MorANDarty/androidHomework/pulls/5/commits","review_comments_url":"https://api.github.com/repos/MorANDarty/androidHomework/pulls/5/comments","review_comment_url":"https://api.github.com/repos/MorANDarty/androidHomework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MorANDarty/androidHomework/issues/5/comments","statuses_url":"https://api.github.com/repos/MorANDarty/androidHomework/statuses/3a010ac7eed6a50883409f496c0dbafa4f93783d","head":{"label":"MorANDarty:tasks/musicPlayer","ref":"tasks/musicPlayer","sha":"3a010ac7eed6a50883409f496c0dbafa4f93783d","user":{"login":"MorANDarty","id":31700845,"node_id":"MDQ6VXNlcjMxNzAwODQ1","avatar_url":"https://avatars0.githubusercontent.com/u/31700845?v=4","gravatar_id":"","url":"https://api.github.com/users/MorANDarty","html_url":"https://github.com/MorANDarty","followers_url":"https://api.github.com/users/MorANDarty/followers","following_url":"https://api.github.com/users/MorANDarty/following{/other_user}","gists_url":"https://api.github.com/users/MorANDarty/gists{/gist_id}","starred_url":"https://api.github.com/users/MorANDarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorANDarty/subscriptions","organizations_url":"https://api.github.com/users/MorANDarty/orgs","repos_url":"https://api.github.com/users/MorANDarty/repos","events_url":"https://api.github.com/users/MorANDarty/events{/privacy}","received_events_url":"https://api.github.com/users/MorANDarty/received_events","type":"User","site_admin":false},"repo":{"id":150588911,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA1ODg5MTE=","name":"androidHomework","full_name":"MorANDarty/androidHomework","private":false,"owner":{"login":"MorANDarty","id":31700845,"node_id":"MDQ6VXNlcjMxNzAwODQ1","avatar_url":"https://avatars0.githubusercontent.com/u/31700845?v=4","gravatar_id":"","url":"https://api.github.com/users/MorANDarty","html_url":"https://github.com/MorANDarty","followers_url":"https://api.github.com/users/MorANDarty/followers","following_url":"https://api.github.com/users/MorANDarty/following{/other_user}","gists_url":"https://api.github.com/users/MorANDarty/gists{/gist_id}","starred_url":"https://api.github.com/users/MorANDarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorANDarty/subscriptions","organizations_url":"https://api.github.com/users/MorANDarty/orgs","repos_url":"https://api.github.com/users/MorANDarty/repos","events_url":"https://api.github.com/users/MorANDarty/events{/privacy}","received_events_url":"https://api.github.com/users/MorANDarty/received_events","type":"User","site_admin":false},"html_url":"https://github.com/MorANDarty/androidHomework","description":"Desc","fork":false,"url":"https://api.github.com/repos/MorANDarty/androidHomework","forks_url":"https://api.github.com/repos/MorANDarty/androidHomework/forks","keys_url":"https://api.github.com/repos/MorANDarty/androidHomework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MorANDarty/androidHomework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MorANDarty/androidHomework/teams","hooks_url":"https://api.github.com/repos/MorANDarty/androidHomework/hooks","issue_events_url":"https://api.github.com/repos/MorANDarty/androidHomework/issues/events{/number}","events_url":"https://api.github.com/repos/MorANDarty/androidHomework/events","assignees_url":"https://api.github.com/repos/MorANDarty/androidHomework/assignees{/user}","branches_url":"https://api.github.com/repos/MorANDarty/androidHomework/branches{/branch}","tags_url":"https://api.github.com/repos/MorANDarty/androidHomework/tags","blobs_url":"https://api.github.com/repos/MorANDarty/androidHomework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MorANDarty/androidHomework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MorANDarty/androidHomework/git/refs{/sha}","trees_url":"https://api.github.com/repos/MorANDarty/androidHomework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MorANDarty/androidHomework/statuses/{sha}","languages_url":"https://api.github.com/repos/MorANDarty/androidHomework/languages","stargazers_url":"https://api.github.com/repos/MorANDarty/androidHomework/stargazers","contributors_url":"https://api.github.com/repos/MorANDarty/androidHomework/contributors","subscribers_url":"https://api.github.com/repos/MorANDarty/androidHomework/subscribers","subscription_url":"https://api.github.com/repos/MorANDarty/androidHomework/subscription","commits_url":"https://api.github.com/repos/MorANDarty/androidHomework/commits{/sha}","git_commits_url":"https://api.github.com/repos/MorANDarty/androidHomework/git/commits{/sha}","comments_url":"https://api.github.com/repos/MorANDarty/androidHomework/comments{/number}","issue_comment_url":"https://api.github.com/repos/MorANDarty/androidHomework/issues/comments{/number}","contents_url":"https://api.github.com/repos/MorANDarty/androidHomework/contents/{+path}","compare_url":"https://api.github.com/repos/MorANDarty/androidHomework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MorANDarty/androidHomework/merges","archive_url":"https://api.github.com/repos/MorANDarty/androidHomework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MorANDarty/androidHomework/downloads","issues_url":"https://api.github.com/repos/MorANDarty/androidHomework/issues{/number}","pulls_url":"https://api.github.com/repos/MorANDarty/androidHomework/pulls{/number}","milestones_url":"https://api.github.com/repos/MorANDarty/androidHomework/milestones{/number}","notifications_url":"https://api.github.com/repos/MorANDarty/androidHomework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MorANDarty/androidHomework/labels{/name}","releases_url":"https://api.github.com/repos/MorANDarty/androidHomework/releases{/id}","deployments_url":"https://api.github.com/repos/MorANDarty/androidHomework/deployments","created_at":"2018-09-27T13:11:12Z","updated_at":"2018-09-27T13:48:14Z","pushed_at":"2018-11-12T17:51:22Z","git_url":"git://github.com/MorANDarty/androidHomework.git","ssh_url":"git@github.com:MorANDarty/androidHomework.git","clone_url":"https://github.com/MorANDarty/androidHomework.git","svn_url":"https://github.com/MorANDarty/androidHomework","homepage":null,"size":306,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"MorANDarty:master","ref":"master","sha":"4b0f063fd2f89613c300233a5bd8a4affe06c6fc","user":{"login":"MorANDarty","id":31700845,"node_id":"MDQ6VXNlcjMxNzAwODQ1","avatar_url":"https://avatars0.githubusercontent.com/u/31700845?v=4","gravatar_id":"","url":"https://api.github.com/users/MorANDarty","html_url":"https://github.com/MorANDarty","followers_url":"https://api.github.com/users/MorANDarty/followers","following_url":"https://api.github.com/users/MorANDarty/following{/other_user}","gists_url":"https://api.github.com/users/MorANDarty/gists{/gist_id}","starred_url":"https://api.github.com/users/MorANDarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorANDarty/subscriptions","organizations_url":"https://api.github.com/users/MorANDarty/orgs","repos_url":"https://api.github.com/users/MorANDarty/repos","events_url":"https://api.github.com/users/MorANDarty/events{/privacy}","received_events_url":"https://api.github.com/users/MorANDarty/received_events","type":"User","site_admin":false},"repo":{"id":150588911,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA1ODg5MTE=","name":"androidHomework","full_name":"MorANDarty/androidHomework","private":false,"owner":{"login":"MorANDarty","id":31700845,"node_id":"MDQ6VXNlcjMxNzAwODQ1","avatar_url":"https://avatars0.githubusercontent.com/u/31700845?v=4","gravatar_id":"","url":"https://api.github.com/users/MorANDarty","html_url":"https://github.com/MorANDarty","followers_url":"https://api.github.com/users/MorANDarty/followers","following_url":"https://api.github.com/users/MorANDarty/following{/other_user}","gists_url":"https://api.github.com/users/MorANDarty/gists{/gist_id}","starred_url":"https://api.github.com/users/MorANDarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorANDarty/subscriptions","organizations_url":"https://api.github.com/users/MorANDarty/orgs","repos_url":"https://api.github.com/users/MorANDarty/repos","events_url":"https://api.github.com/users/MorANDarty/events{/privacy}","received_events_url":"https://api.github.com/users/MorANDarty/received_events","type":"User","site_admin":false},"html_url":"https://github.com/MorANDarty/androidHomework","description":"Desc","fork":false,"url":"https://api.github.com/repos/MorANDarty/androidHomework","forks_url":"https://api.github.com/repos/MorANDarty/androidHomework/forks","keys_url":"https://api.github.com/repos/MorANDarty/androidHomework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MorANDarty/androidHomework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MorANDarty/androidHomework/teams","hooks_url":"https://api.github.com/repos/MorANDarty/androidHomework/hooks","issue_events_url":"https://api.github.com/repos/MorANDarty/androidHomework/issues/events{/number}","events_url":"https://api.github.com/repos/MorANDarty/androidHomework/events","assignees_url":"https://api.github.com/repos/MorANDarty/androidHomework/assignees{/user}","branches_url":"https://api.github.com/repos/MorANDarty/androidHomework/branches{/branch}","tags_url":"https://api.github.com/repos/MorANDarty/androidHomework/tags","blobs_url":"https://api.github.com/repos/MorANDarty/androidHomework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MorANDarty/androidHomework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MorANDarty/androidHomework/git/refs{/sha}","trees_url":"https://api.github.com/repos/MorANDarty/androidHomework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MorANDarty/androidHomework/statuses/{sha}","languages_url":"https://api.github.com/repos/MorANDarty/androidHomework/languages","stargazers_url":"https://api.github.com/repos/MorANDarty/androidHomework/stargazers","contributors_url":"https://api.github.com/repos/MorANDarty/androidHomework/contributors","subscribers_url":"https://api.github.com/repos/MorANDarty/androidHomework/subscribers","subscription_url":"https://api.github.com/repos/MorANDarty/androidHomework/subscription","commits_url":"https://api.github.com/repos/MorANDarty/androidHomework/commits{/sha}","git_commits_url":"https://api.github.com/repos/MorANDarty/androidHomework/git/commits{/sha}","comments_url":"https://api.github.com/repos/MorANDarty/androidHomework/comments{/number}","issue_comment_url":"https://api.github.com/repos/MorANDarty/androidHomework/issues/comments{/number}","contents_url":"https://api.github.com/repos/MorANDarty/androidHomework/contents/{+path}","compare_url":"https://api.github.com/repos/MorANDarty/androidHomework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MorANDarty/androidHomework/merges","archive_url":"https://api.github.com/repos/MorANDarty/androidHomework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MorANDarty/androidHomework/downloads","issues_url":"https://api.github.com/repos/MorANDarty/androidHomework/issues{/number}","pulls_url":"https://api.github.com/repos/MorANDarty/androidHomework/pulls{/number}","milestones_url":"https://api.github.com/repos/MorANDarty/androidHomework/milestones{/number}","notifications_url":"https://api.github.com/repos/MorANDarty/androidHomework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MorANDarty/androidHomework/labels{/name}","releases_url":"https://api.github.com/repos/MorANDarty/androidHomework/releases{/id}","deployments_url":"https://api.github.com/repos/MorANDarty/androidHomework/deployments","created_at":"2018-09-27T13:11:12Z","updated_at":"2018-09-27T13:48:14Z","pushed_at":"2018-11-12T17:51:22Z","git_url":"git://github.com/MorANDarty/androidHomework.git","ssh_url":"git@github.com:MorANDarty/androidHomework.git","clone_url":"https://github.com/MorANDarty/androidHomework.git","svn_url":"https://github.com/MorANDarty/androidHomework","homepage":null,"size":306,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MorANDarty/androidHomework/pulls/5"},"html":{"href":"https://github.com/MorANDarty/androidHomework/pull/5"},"issue":{"href":"https://api.github.com/repos/MorANDarty/androidHomework/issues/5"},"comments":{"href":"https://api.github.com/repos/MorANDarty/androidHomework/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/MorANDarty/androidHomework/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/MorANDarty/androidHomework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MorANDarty/androidHomework/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/MorANDarty/androidHomework/statuses/3a010ac7eed6a50883409f496c0dbafa4f93783d"}},"author_association":"OWNER"}}
{"actor":{"display_login":"NailShaykhrazievItis"}}