{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/ems/pulls/comments/41721772","id":41721772,"diff_hunk":"@@ -0,0 +1,141 @@\n+package framgia.employeemanagement;\n+\n+/**\n+ * Created by FRAMGIA\\nguyen.huu.quyen on 05/10/2015.\n+ */\n+\n+import android.app.Activity;\n+import android.app.AlertDialog;\n+import android.content.Context;\n+import android.content.DialogInterface;\n+import android.content.Intent;\n+import android.content.res.Resources;\n+import android.graphics.Color;\n+import android.os.Bundle;\n+import android.view.LayoutInflater;\n+import android.view.View;\n+import android.view.ViewGroup;\n+import android.widget.BaseAdapter;\n+import android.widget.ImageView;\n+import android.widget.TextView;\n+\n+import java.util.ArrayList;\n+\n+/********* Adapter class extends with BaseAdapter and implements with OnClickListener ************/\n+public class EmployeeAdapter extends BaseAdapter{\n+    private static final int VIEWMODE = 1;\n+    private static final int ADDMODE = 2;\n+    private static final int EDITMODE = 3;\n+    /*********** Declare Used Variables *********/\n+    private Activity activity;\n+    private ArrayList data;\n+    private static LayoutInflater inflater=null;\n+    public Resources res;\n+    Employee employee=null;\n+    /*************  EmployeeAdapter Constructor *****************/\n+    public EmployeeAdapter(Activity a, ArrayList d,Resources resLocal) {\n+        /********** Take passed values **********/\n+        activity = a;\n+        data=d;\n+        res = resLocal;\n+        /***********  Layout inflator to call external xml layout () ***********/\n+        inflater = ( LayoutInflater )activity.\n+                getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n+    }\n+    /******** What is the size of Passed Arraylist Size ************/\n+    @Override\n+    public int getCount() {\n+        if(data.size()<=0)\n+            return 1;\n+        return data.size();\n+    }\n+    @Override\n+    public Object getItem(int position) {\n+        return position;\n+    }\n+    @Override\n+    public long getItemId(int position) {\n+        return position;\n+    }\n+    /********* Create a holder Class to contain inflated xml file elements *********/\n+    public static class ViewHolder{\n+        public TextView text;\n+        public TextView text1;\n+        public ImageView image;\n+    }\n+    /****** Depends upon data size called for each row , Create each Employee row *****/\n+    @Override\n+    public View getView(int position, View convertView, ViewGroup parent) {\n+        View vi = convertView;\n+        ViewHolder holder;\n+        if(convertView==null){\n+            /****** Inflate tabitem.xml file for each row ( Defined below ) *******/\n+            vi = inflater.inflate(R.layout.employee_listview, null);\n+            /****** View Holder Object to contain tabitem.xml file elements ******/\n+            holder = new ViewHolder();\n+            holder.text = (TextView) vi.findViewById(R.id.text);\n+            holder.text1=(TextView)vi.findViewById(R.id.text1);\n+            holder.image=(ImageView)vi.findViewById(R.id.image);\n+            /************  Set holder with LayoutInflater ************/\n+            vi.setTag( holder );\n+        }\n+        else\n+            holder=(ViewHolder)vi.getTag();\n+        if(data.size()<=0)\n+        {\n+            holder.text.setText(\"No Data\");\n+        }\n+        else\n+        {\n+            /***** Get each Model object from Arraylist ********/\n+            employee=null;\n+            employee = ( Employee ) data.get( position );\n+\n+            /************  Set Model values in Holder elements ***********/\n+            //Display several data only\n+            holder.text.setText(employee.getName());\n+            holder.text1.setText(employee.getPosition() + \" /Leave date: \" + employee.getLeaveDate());","path":"EmployeeManagement/app/src/main/java/framgia/employeemanagement/EmployeeAdapter.java","position":97,"original_position":97,"commit_id":"bc5b6e1fe95bb5464c4170e7aff66c5d5925bb6e","original_commit_id":"bc5b6e1fe95bb5464c4170e7aff66c5d5925bb6e","user":{"login":"trungkienvu85","id":2076223,"avatar_url":"https://avatars.githubusercontent.com/u/2076223?v=3","gravatar_id":"","url":"https://api.github.com/users/trungkienvu85","html_url":"https://github.com/trungkienvu85","followers_url":"https://api.github.com/users/trungkienvu85/followers","following_url":"https://api.github.com/users/trungkienvu85/following{/other_user}","gists_url":"https://api.github.com/users/trungkienvu85/gists{/gist_id}","starred_url":"https://api.github.com/users/trungkienvu85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trungkienvu85/subscriptions","organizations_url":"https://api.github.com/users/trungkienvu85/orgs","repos_url":"https://api.github.com/users/trungkienvu85/repos","events_url":"https://api.github.com/users/trungkienvu85/events{/privacy}","received_events_url":"https://api.github.com/users/trungkienvu85/received_events","type":"User","site_admin":false},"body":"Tất cả text và cấu trúc câu em ko được get trực tiếp mà gọi qua xml, Nếu cos khó khăn thì hỏi mọi người nhé!","created_at":"2015-10-12T04:10:25Z","updated_at":"2015-10-12T04:10:25Z","html_url":"https://github.com/framgia/ems/pull/7#discussion_r41721772","pull_request_url":"https://api.github.com/repos/framgia/ems/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/framgia/ems/pulls/comments/41721772"},"html":{"href":"https://github.com/framgia/ems/pull/7#discussion_r41721772"},"pull_request":{"href":"https://api.github.com/repos/framgia/ems/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/ems/pulls/7","id":47247767,"html_url":"https://github.com/framgia/ems/pull/7","diff_url":"https://github.com/framgia/ems/pull/7.diff","patch_url":"https://github.com/framgia/ems/pull/7.patch","issue_url":"https://api.github.com/repos/framgia/ems/issues/7","number":7,"state":"open","locked":false,"title":"task UI","user":{"login":"nguyenhuuquyen","id":14921136,"avatar_url":"https://avatars.githubusercontent.com/u/14921136?v=3","gravatar_id":"","url":"https://api.github.com/users/nguyenhuuquyen","html_url":"https://github.com/nguyenhuuquyen","followers_url":"https://api.github.com/users/nguyenhuuquyen/followers","following_url":"https://api.github.com/users/nguyenhuuquyen/following{/other_user}","gists_url":"https://api.github.com/users/nguyenhuuquyen/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenhuuquyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenhuuquyen/subscriptions","organizations_url":"https://api.github.com/users/nguyenhuuquyen/orgs","repos_url":"https://api.github.com/users/nguyenhuuquyen/repos","events_url":"https://api.github.com/users/nguyenhuuquyen/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenhuuquyen/received_events","type":"User","site_admin":false},"body":"@trungkienvu85  Anh ơi, review giúp em với ạ. :D ","created_at":"2015-10-09T08:53:28Z","updated_at":"2015-10-12T04:10:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3e05163928ed89e9fd96c5a222abc261b6d0fda","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/ems/pulls/7/commits","review_comments_url":"https://api.github.com/repos/framgia/ems/pulls/7/comments","review_comment_url":"https://api.github.com/repos/framgia/ems/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/ems/issues/7/comments","statuses_url":"https://api.github.com/repos/framgia/ems/statuses/bc5b6e1fe95bb5464c4170e7aff66c5d5925bb6e","head":{"label":"nguyenhuuquyen:UIDesign","ref":"UIDesign","sha":"bc5b6e1fe95bb5464c4170e7aff66c5d5925bb6e","user":{"login":"nguyenhuuquyen","id":14921136,"avatar_url":"https://avatars.githubusercontent.com/u/14921136?v=3","gravatar_id":"","url":"https://api.github.com/users/nguyenhuuquyen","html_url":"https://github.com/nguyenhuuquyen","followers_url":"https://api.github.com/users/nguyenhuuquyen/followers","following_url":"https://api.github.com/users/nguyenhuuquyen/following{/other_user}","gists_url":"https://api.github.com/users/nguyenhuuquyen/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenhuuquyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenhuuquyen/subscriptions","organizations_url":"https://api.github.com/users/nguyenhuuquyen/orgs","repos_url":"https://api.github.com/users/nguyenhuuquyen/repos","events_url":"https://api.github.com/users/nguyenhuuquyen/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenhuuquyen/received_events","type":"User","site_admin":false},"repo":{"id":43485135,"name":"ems","full_name":"nguyenhuuquyen/ems","owner":{"login":"nguyenhuuquyen","id":14921136,"avatar_url":"https://avatars.githubusercontent.com/u/14921136?v=3","gravatar_id":"","url":"https://api.github.com/users/nguyenhuuquyen","html_url":"https://github.com/nguyenhuuquyen","followers_url":"https://api.github.com/users/nguyenhuuquyen/followers","following_url":"https://api.github.com/users/nguyenhuuquyen/following{/other_user}","gists_url":"https://api.github.com/users/nguyenhuuquyen/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenhuuquyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenhuuquyen/subscriptions","organizations_url":"https://api.github.com/users/nguyenhuuquyen/orgs","repos_url":"https://api.github.com/users/nguyenhuuquyen/repos","events_url":"https://api.github.com/users/nguyenhuuquyen/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenhuuquyen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nguyenhuuquyen/ems","description":"Employee Management System (training)","fork":true,"url":"https://api.github.com/repos/nguyenhuuquyen/ems","forks_url":"https://api.github.com/repos/nguyenhuuquyen/ems/forks","keys_url":"https://api.github.com/repos/nguyenhuuquyen/ems/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nguyenhuuquyen/ems/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nguyenhuuquyen/ems/teams","hooks_url":"https://api.github.com/repos/nguyenhuuquyen/ems/hooks","issue_events_url":"https://api.github.com/repos/nguyenhuuquyen/ems/issues/events{/number}","events_url":"https://api.github.com/repos/nguyenhuuquyen/ems/events","assignees_url":"https://api.github.com/repos/nguyenhuuquyen/ems/assignees{/user}","branches_url":"https://api.github.com/repos/nguyenhuuquyen/ems/branches{/branch}","tags_url":"https://api.github.com/repos/nguyenhuuquyen/ems/tags","blobs_url":"https://api.github.com/repos/nguyenhuuquyen/ems/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nguyenhuuquyen/ems/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nguyenhuuquyen/ems/git/refs{/sha}","trees_url":"https://api.github.com/repos/nguyenhuuquyen/ems/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nguyenhuuquyen/ems/statuses/{sha}","languages_url":"https://api.github.com/repos/nguyenhuuquyen/ems/languages","stargazers_url":"https://api.github.com/repos/nguyenhuuquyen/ems/stargazers","contributors_url":"https://api.github.com/repos/nguyenhuuquyen/ems/contributors","subscribers_url":"https://api.github.com/repos/nguyenhuuquyen/ems/subscribers","subscription_url":"https://api.github.com/repos/nguyenhuuquyen/ems/subscription","commits_url":"https://api.github.com/repos/nguyenhuuquyen/ems/commits{/sha}","git_commits_url":"https://api.github.com/repos/nguyenhuuquyen/ems/git/commits{/sha}","comments_url":"https://api.github.com/repos/nguyenhuuquyen/ems/comments{/number}","issue_comment_url":"https://api.github.com/repos/nguyenhuuquyen/ems/issues/comments{/number}","contents_url":"https://api.github.com/repos/nguyenhuuquyen/ems/contents/{+path}","compare_url":"https://api.github.com/repos/nguyenhuuquyen/ems/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nguyenhuuquyen/ems/merges","archive_url":"https://api.github.com/repos/nguyenhuuquyen/ems/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nguyenhuuquyen/ems/downloads","issues_url":"https://api.github.com/repos/nguyenhuuquyen/ems/issues{/number}","pulls_url":"https://api.github.com/repos/nguyenhuuquyen/ems/pulls{/number}","milestones_url":"https://api.github.com/repos/nguyenhuuquyen/ems/milestones{/number}","notifications_url":"https://api.github.com/repos/nguyenhuuquyen/ems/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nguyenhuuquyen/ems/labels{/name}","releases_url":"https://api.github.com/repos/nguyenhuuquyen/ems/releases{/id}","created_at":"2015-10-01T08:06:46Z","updated_at":"2015-10-01T06:54:08Z","pushed_at":"2015-10-09T10:44:39Z","git_url":"git://github.com/nguyenhuuquyen/ems.git","ssh_url":"git@github.com:nguyenhuuquyen/ems.git","clone_url":"https://github.com/nguyenhuuquyen/ems.git","svn_url":"https://github.com/nguyenhuuquyen/ems","homepage":null,"size":1546,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"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":"framgia:develop","ref":"develop","sha":"56fd71e7438e824bf9577a94b6b4f3af8746fbc9","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":43482602,"name":"ems","full_name":"framgia/ems","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/ems","description":"Employee Management System (training)","fork":false,"url":"https://api.github.com/repos/framgia/ems","forks_url":"https://api.github.com/repos/framgia/ems/forks","keys_url":"https://api.github.com/repos/framgia/ems/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/ems/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/ems/teams","hooks_url":"https://api.github.com/repos/framgia/ems/hooks","issue_events_url":"https://api.github.com/repos/framgia/ems/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/ems/events","assignees_url":"https://api.github.com/repos/framgia/ems/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/ems/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/ems/tags","blobs_url":"https://api.github.com/repos/framgia/ems/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/ems/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/ems/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/ems/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/ems/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/ems/languages","stargazers_url":"https://api.github.com/repos/framgia/ems/stargazers","contributors_url":"https://api.github.com/repos/framgia/ems/contributors","subscribers_url":"https://api.github.com/repos/framgia/ems/subscribers","subscription_url":"https://api.github.com/repos/framgia/ems/subscription","commits_url":"https://api.github.com/repos/framgia/ems/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/ems/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/ems/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/ems/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/ems/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/ems/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/ems/merges","archive_url":"https://api.github.com/repos/framgia/ems/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/ems/downloads","issues_url":"https://api.github.com/repos/framgia/ems/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/ems/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/ems/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/ems/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/ems/labels{/name}","releases_url":"https://api.github.com/repos/framgia/ems/releases{/id}","created_at":"2015-10-01T06:54:08Z","updated_at":"2015-10-01T06:54:08Z","pushed_at":"2015-10-09T10:44:40Z","git_url":"git://github.com/framgia/ems.git","ssh_url":"git@github.com:framgia/ems.git","clone_url":"https://github.com/framgia/ems.git","svn_url":"https://github.com/framgia/ems","homepage":null,"size":3609,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":5,"forks":2,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/ems/pulls/7"},"html":{"href":"https://github.com/framgia/ems/pull/7"},"issue":{"href":"https://api.github.com/repos/framgia/ems/issues/7"},"comments":{"href":"https://api.github.com/repos/framgia/ems/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/ems/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/ems/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/ems/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/ems/statuses/bc5b6e1fe95bb5464c4170e7aff66c5d5925bb6e"}}}}