{"action":"created","comment":{"url":"https://api.github.com/repos/cobala9211/VideoApp/pulls/comments/75418397","id":75418397,"diff_hunk":"@@ -0,0 +1,96 @@\n+package com.example.dnp.videoapp.fragment;\n+\n+import android.support.v7.widget.LinearLayoutManager;\n+import android.support.v7.widget.RecyclerView;\n+import android.view.GestureDetector;\n+import android.view.MotionEvent;\n+import android.view.View;\n+\n+import com.example.dnp.videoapp.R;\n+import com.example.dnp.videoapp.adapter.VideoOnlineAdapter;\n+import com.example.dnp.videoapp.model.VideoOnline;\n+import com.firebase.client.DataSnapshot;\n+import com.firebase.client.Firebase;\n+import com.firebase.client.FirebaseError;\n+import com.firebase.client.ValueEventListener;\n+\n+import org.androidannotations.annotations.EFragment;\n+import org.androidannotations.annotations.ViewById;\n+\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+/**\n+ * Created by dnp on 17/08/2016.\n+ */\n+@EFragment(R.layout.fragment_video_online)\n+public class VideoOnlineFragment extends BaseFragment {\n+\n+    private List<VideoOnline> mListVideos = new ArrayList<>();\n+    public VideoOnlineAdapter mVideoOnlineAdapter;\n+    @ViewById(R.id.recyclerViewOnline)\n+    RecyclerView mRecyclerViewOnline;\n+\n+    @Override\n+    void afterViews() {\n+        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());\n+        mRecyclerViewOnline.setLayoutManager(linearLayoutManager);\n+        mRecyclerViewOnline.setHasFixedSize(true);\n+        mVideoOnlineAdapter = new VideoOnlineAdapter(mListVideos);\n+        mRecyclerViewOnline.setAdapter(mVideoOnlineAdapter);\n+        loadDataVideoOnline();\n+        final GestureDetector mGestureDetector = getGestureDetector();\n+        mRecyclerViewOnline.addOnItemTouchListener(new RecyclerView.OnItemTouchListener() {\n+            @Override\n+            public boolean onInterceptTouchEvent(RecyclerView recyclerView, MotionEvent motionEvent) {\n+                View childView = recyclerView.findChildViewUnder(motionEvent.getX(), motionEvent.getY());\n+                return childView != null && mGestureDetector.onTouchEvent(motionEvent);\n+            }\n+\n+            @Override\n+            public void onTouchEvent(RecyclerView recyclerView, MotionEvent motionEvent) {\n+            }\n+\n+            @Override\n+            public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) {\n+            }\n+        });\n+    }\n+\n+    private void loadDataVideoOnline() {\n+        Firebase.setAndroidContext(getContext());\n+        Firebase root = new Firebase(getString(R.string.main_firebase_root_database_video_online));\n+        root.addValueEventListener(new ValueEventListener() {\n+            @Override\n+            public void onDataChange(DataSnapshot dataSnapshot) {\n+                mListVideos.clear();\n+                for (DataSnapshot data : dataSnapshot.getChildren()) {\n+                    for (DataSnapshot object : data.getChildren()) {\n+                        mListVideos.add(object.getValue(VideoOnline.class));\n+                        mVideoOnlineAdapter.notifyDataSetChanged();","path":"app/src/main/java/com/example/dnp/videoapp/fragment/VideoOnlineFragment.java","position":70,"original_position":70,"commit_id":"ab0af84280cd0b299cc8fc72634b291123e50aca","original_commit_id":"ab0af84280cd0b299cc8fc72634b291123e50aca","user":{"login":"at-binc","id":16132112,"avatar_url":"https://avatars.githubusercontent.com/u/16132112?v=3","gravatar_id":"","url":"https://api.github.com/users/at-binc","html_url":"https://github.com/at-binc","followers_url":"https://api.github.com/users/at-binc/followers","following_url":"https://api.github.com/users/at-binc/following{/other_user}","gists_url":"https://api.github.com/users/at-binc/gists{/gist_id}","starred_url":"https://api.github.com/users/at-binc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at-binc/subscriptions","organizations_url":"https://api.github.com/users/at-binc/orgs","repos_url":"https://api.github.com/users/at-binc/repos","events_url":"https://api.github.com/users/at-binc/events{/privacy}","received_events_url":"https://api.github.com/users/at-binc/received_events","type":"User","site_admin":false},"body":"nên xong việc add rồi mới notifyDataSetChanged","created_at":"2016-08-19T01:59:08Z","updated_at":"2016-08-19T01:59:08Z","html_url":"https://github.com/cobala9211/VideoApp/pull/3#discussion_r75418397","pull_request_url":"https://api.github.com/repos/cobala9211/VideoApp/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/cobala9211/VideoApp/pulls/comments/75418397"},"html":{"href":"https://github.com/cobala9211/VideoApp/pull/3#discussion_r75418397"},"pull_request":{"href":"https://api.github.com/repos/cobala9211/VideoApp/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/cobala9211/VideoApp/pulls/3","id":81616438,"html_url":"https://github.com/cobala9211/VideoApp/pull/3","diff_url":"https://github.com/cobala9211/VideoApp/pull/3.diff","patch_url":"https://github.com/cobala9211/VideoApp/pull/3.patch","issue_url":"https://api.github.com/repos/cobala9211/VideoApp/issues/3","number":3,"state":"open","locked":false,"title":"create fragment video online, get list data from firebase and show to…","user":{"login":"cobala9211","id":20347260,"avatar_url":"https://avatars.githubusercontent.com/u/20347260?v=3","gravatar_id":"","url":"https://api.github.com/users/cobala9211","html_url":"https://github.com/cobala9211","followers_url":"https://api.github.com/users/cobala9211/followers","following_url":"https://api.github.com/users/cobala9211/following{/other_user}","gists_url":"https://api.github.com/users/cobala9211/gists{/gist_id}","starred_url":"https://api.github.com/users/cobala9211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cobala9211/subscriptions","organizations_url":"https://api.github.com/users/cobala9211/orgs","repos_url":"https://api.github.com/users/cobala9211/repos","events_url":"https://api.github.com/users/cobala9211/events{/privacy}","received_events_url":"https://api.github.com/users/cobala9211/received_events","type":"User","site_admin":false},"body":"… recyclerview","created_at":"2016-08-17T10:09:55Z","updated_at":"2016-08-19T01:59:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"827f80b74e94a5bdfc679860fa5eb142f7829e3a","assignee":{"login":"at-tienlq","id":16131988,"avatar_url":"https://avatars.githubusercontent.com/u/16131988?v=3","gravatar_id":"","url":"https://api.github.com/users/at-tienlq","html_url":"https://github.com/at-tienlq","followers_url":"https://api.github.com/users/at-tienlq/followers","following_url":"https://api.github.com/users/at-tienlq/following{/other_user}","gists_url":"https://api.github.com/users/at-tienlq/gists{/gist_id}","starred_url":"https://api.github.com/users/at-tienlq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at-tienlq/subscriptions","organizations_url":"https://api.github.com/users/at-tienlq/orgs","repos_url":"https://api.github.com/users/at-tienlq/repos","events_url":"https://api.github.com/users/at-tienlq/events{/privacy}","received_events_url":"https://api.github.com/users/at-tienlq/received_events","type":"User","site_admin":false},"assignees":[{"login":"at-tienlq","id":16131988,"avatar_url":"https://avatars.githubusercontent.com/u/16131988?v=3","gravatar_id":"","url":"https://api.github.com/users/at-tienlq","html_url":"https://github.com/at-tienlq","followers_url":"https://api.github.com/users/at-tienlq/followers","following_url":"https://api.github.com/users/at-tienlq/following{/other_user}","gists_url":"https://api.github.com/users/at-tienlq/gists{/gist_id}","starred_url":"https://api.github.com/users/at-tienlq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at-tienlq/subscriptions","organizations_url":"https://api.github.com/users/at-tienlq/orgs","repos_url":"https://api.github.com/users/at-tienlq/repos","events_url":"https://api.github.com/users/at-tienlq/events{/privacy}","received_events_url":"https://api.github.com/users/at-tienlq/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/cobala9211/VideoApp/pulls/3/commits","review_comments_url":"https://api.github.com/repos/cobala9211/VideoApp/pulls/3/comments","review_comment_url":"https://api.github.com/repos/cobala9211/VideoApp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cobala9211/VideoApp/issues/3/comments","statuses_url":"https://api.github.com/repos/cobala9211/VideoApp/statuses/ab0af84280cd0b299cc8fc72634b291123e50aca","head":{"label":"cobala9211:create_fragment_video_online/20160817-phuongdn-create_fragment_video_online_get_data","ref":"create_fragment_video_online/20160817-phuongdn-create_fragment_video_online_get_data","sha":"ab0af84280cd0b299cc8fc72634b291123e50aca","user":{"login":"cobala9211","id":20347260,"avatar_url":"https://avatars.githubusercontent.com/u/20347260?v=3","gravatar_id":"","url":"https://api.github.com/users/cobala9211","html_url":"https://github.com/cobala9211","followers_url":"https://api.github.com/users/cobala9211/followers","following_url":"https://api.github.com/users/cobala9211/following{/other_user}","gists_url":"https://api.github.com/users/cobala9211/gists{/gist_id}","starred_url":"https://api.github.com/users/cobala9211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cobala9211/subscriptions","organizations_url":"https://api.github.com/users/cobala9211/orgs","repos_url":"https://api.github.com/users/cobala9211/repos","events_url":"https://api.github.com/users/cobala9211/events{/privacy}","received_events_url":"https://api.github.com/users/cobala9211/received_events","type":"User","site_admin":false},"repo":{"id":65350679,"name":"VideoApp","full_name":"cobala9211/VideoApp","owner":{"login":"cobala9211","id":20347260,"avatar_url":"https://avatars.githubusercontent.com/u/20347260?v=3","gravatar_id":"","url":"https://api.github.com/users/cobala9211","html_url":"https://github.com/cobala9211","followers_url":"https://api.github.com/users/cobala9211/followers","following_url":"https://api.github.com/users/cobala9211/following{/other_user}","gists_url":"https://api.github.com/users/cobala9211/gists{/gist_id}","starred_url":"https://api.github.com/users/cobala9211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cobala9211/subscriptions","organizations_url":"https://api.github.com/users/cobala9211/orgs","repos_url":"https://api.github.com/users/cobala9211/repos","events_url":"https://api.github.com/users/cobala9211/events{/privacy}","received_events_url":"https://api.github.com/users/cobala9211/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cobala9211/VideoApp","description":null,"fork":false,"url":"https://api.github.com/repos/cobala9211/VideoApp","forks_url":"https://api.github.com/repos/cobala9211/VideoApp/forks","keys_url":"https://api.github.com/repos/cobala9211/VideoApp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cobala9211/VideoApp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cobala9211/VideoApp/teams","hooks_url":"https://api.github.com/repos/cobala9211/VideoApp/hooks","issue_events_url":"https://api.github.com/repos/cobala9211/VideoApp/issues/events{/number}","events_url":"https://api.github.com/repos/cobala9211/VideoApp/events","assignees_url":"https://api.github.com/repos/cobala9211/VideoApp/assignees{/user}","branches_url":"https://api.github.com/repos/cobala9211/VideoApp/branches{/branch}","tags_url":"https://api.github.com/repos/cobala9211/VideoApp/tags","blobs_url":"https://api.github.com/repos/cobala9211/VideoApp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cobala9211/VideoApp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cobala9211/VideoApp/git/refs{/sha}","trees_url":"https://api.github.com/repos/cobala9211/VideoApp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cobala9211/VideoApp/statuses/{sha}","languages_url":"https://api.github.com/repos/cobala9211/VideoApp/languages","stargazers_url":"https://api.github.com/repos/cobala9211/VideoApp/stargazers","contributors_url":"https://api.github.com/repos/cobala9211/VideoApp/contributors","subscribers_url":"https://api.github.com/repos/cobala9211/VideoApp/subscribers","subscription_url":"https://api.github.com/repos/cobala9211/VideoApp/subscription","commits_url":"https://api.github.com/repos/cobala9211/VideoApp/commits{/sha}","git_commits_url":"https://api.github.com/repos/cobala9211/VideoApp/git/commits{/sha}","comments_url":"https://api.github.com/repos/cobala9211/VideoApp/comments{/number}","issue_comment_url":"https://api.github.com/repos/cobala9211/VideoApp/issues/comments{/number}","contents_url":"https://api.github.com/repos/cobala9211/VideoApp/contents/{+path}","compare_url":"https://api.github.com/repos/cobala9211/VideoApp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cobala9211/VideoApp/merges","archive_url":"https://api.github.com/repos/cobala9211/VideoApp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cobala9211/VideoApp/downloads","issues_url":"https://api.github.com/repos/cobala9211/VideoApp/issues{/number}","pulls_url":"https://api.github.com/repos/cobala9211/VideoApp/pulls{/number}","milestones_url":"https://api.github.com/repos/cobala9211/VideoApp/milestones{/number}","notifications_url":"https://api.github.com/repos/cobala9211/VideoApp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cobala9211/VideoApp/labels{/name}","releases_url":"https://api.github.com/repos/cobala9211/VideoApp/releases{/id}","deployments_url":"https://api.github.com/repos/cobala9211/VideoApp/deployments","created_at":"2016-08-10T04:31:17Z","updated_at":"2016-08-10T04:35:46Z","pushed_at":"2016-08-18T08:50:36Z","git_url":"git://github.com/cobala9211/VideoApp.git","ssh_url":"git@github.com:cobala9211/VideoApp.git","clone_url":"https://github.com/cobala9211/VideoApp.git","svn_url":"https://github.com/cobala9211/VideoApp","homepage":null,"size":291,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"cobala9211:master","ref":"master","sha":"0d5bde519c155e91b33df5971020ff63769222fc","user":{"login":"cobala9211","id":20347260,"avatar_url":"https://avatars.githubusercontent.com/u/20347260?v=3","gravatar_id":"","url":"https://api.github.com/users/cobala9211","html_url":"https://github.com/cobala9211","followers_url":"https://api.github.com/users/cobala9211/followers","following_url":"https://api.github.com/users/cobala9211/following{/other_user}","gists_url":"https://api.github.com/users/cobala9211/gists{/gist_id}","starred_url":"https://api.github.com/users/cobala9211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cobala9211/subscriptions","organizations_url":"https://api.github.com/users/cobala9211/orgs","repos_url":"https://api.github.com/users/cobala9211/repos","events_url":"https://api.github.com/users/cobala9211/events{/privacy}","received_events_url":"https://api.github.com/users/cobala9211/received_events","type":"User","site_admin":false},"repo":{"id":65350679,"name":"VideoApp","full_name":"cobala9211/VideoApp","owner":{"login":"cobala9211","id":20347260,"avatar_url":"https://avatars.githubusercontent.com/u/20347260?v=3","gravatar_id":"","url":"https://api.github.com/users/cobala9211","html_url":"https://github.com/cobala9211","followers_url":"https://api.github.com/users/cobala9211/followers","following_url":"https://api.github.com/users/cobala9211/following{/other_user}","gists_url":"https://api.github.com/users/cobala9211/gists{/gist_id}","starred_url":"https://api.github.com/users/cobala9211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cobala9211/subscriptions","organizations_url":"https://api.github.com/users/cobala9211/orgs","repos_url":"https://api.github.com/users/cobala9211/repos","events_url":"https://api.github.com/users/cobala9211/events{/privacy}","received_events_url":"https://api.github.com/users/cobala9211/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cobala9211/VideoApp","description":null,"fork":false,"url":"https://api.github.com/repos/cobala9211/VideoApp","forks_url":"https://api.github.com/repos/cobala9211/VideoApp/forks","keys_url":"https://api.github.com/repos/cobala9211/VideoApp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cobala9211/VideoApp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cobala9211/VideoApp/teams","hooks_url":"https://api.github.com/repos/cobala9211/VideoApp/hooks","issue_events_url":"https://api.github.com/repos/cobala9211/VideoApp/issues/events{/number}","events_url":"https://api.github.com/repos/cobala9211/VideoApp/events","assignees_url":"https://api.github.com/repos/cobala9211/VideoApp/assignees{/user}","branches_url":"https://api.github.com/repos/cobala9211/VideoApp/branches{/branch}","tags_url":"https://api.github.com/repos/cobala9211/VideoApp/tags","blobs_url":"https://api.github.com/repos/cobala9211/VideoApp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cobala9211/VideoApp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cobala9211/VideoApp/git/refs{/sha}","trees_url":"https://api.github.com/repos/cobala9211/VideoApp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cobala9211/VideoApp/statuses/{sha}","languages_url":"https://api.github.com/repos/cobala9211/VideoApp/languages","stargazers_url":"https://api.github.com/repos/cobala9211/VideoApp/stargazers","contributors_url":"https://api.github.com/repos/cobala9211/VideoApp/contributors","subscribers_url":"https://api.github.com/repos/cobala9211/VideoApp/subscribers","subscription_url":"https://api.github.com/repos/cobala9211/VideoApp/subscription","commits_url":"https://api.github.com/repos/cobala9211/VideoApp/commits{/sha}","git_commits_url":"https://api.github.com/repos/cobala9211/VideoApp/git/commits{/sha}","comments_url":"https://api.github.com/repos/cobala9211/VideoApp/comments{/number}","issue_comment_url":"https://api.github.com/repos/cobala9211/VideoApp/issues/comments{/number}","contents_url":"https://api.github.com/repos/cobala9211/VideoApp/contents/{+path}","compare_url":"https://api.github.com/repos/cobala9211/VideoApp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cobala9211/VideoApp/merges","archive_url":"https://api.github.com/repos/cobala9211/VideoApp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cobala9211/VideoApp/downloads","issues_url":"https://api.github.com/repos/cobala9211/VideoApp/issues{/number}","pulls_url":"https://api.github.com/repos/cobala9211/VideoApp/pulls{/number}","milestones_url":"https://api.github.com/repos/cobala9211/VideoApp/milestones{/number}","notifications_url":"https://api.github.com/repos/cobala9211/VideoApp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cobala9211/VideoApp/labels{/name}","releases_url":"https://api.github.com/repos/cobala9211/VideoApp/releases{/id}","deployments_url":"https://api.github.com/repos/cobala9211/VideoApp/deployments","created_at":"2016-08-10T04:31:17Z","updated_at":"2016-08-10T04:35:46Z","pushed_at":"2016-08-18T08:50:36Z","git_url":"git://github.com/cobala9211/VideoApp.git","ssh_url":"git@github.com:cobala9211/VideoApp.git","clone_url":"https://github.com/cobala9211/VideoApp.git","svn_url":"https://github.com/cobala9211/VideoApp","homepage":null,"size":291,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cobala9211/VideoApp/pulls/3"},"html":{"href":"https://github.com/cobala9211/VideoApp/pull/3"},"issue":{"href":"https://api.github.com/repos/cobala9211/VideoApp/issues/3"},"comments":{"href":"https://api.github.com/repos/cobala9211/VideoApp/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/cobala9211/VideoApp/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/cobala9211/VideoApp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cobala9211/VideoApp/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/cobala9211/VideoApp/statuses/ab0af84280cd0b299cc8fc72634b291123e50aca"}}}}
{"actor":{"display_login":"at-binc"}}