{"action":"created","comment":{"url":"https://api.github.com/repos/iojichervo/WoloxTraining/pulls/comments/27475083","id":27475083,"diff_hunk":"@@ -1,115 +1,100 @@\n package com.example.iojananchervonagura.woloxtraining;\n \n-import java.util.Locale;\n-\n-import android.graphics.Color;\n-import android.support.v4.view.PagerTabStrip;\n-import android.support.v7.app.ActionBarActivity;\n-import android.support.v7.app.ActionBar;\n+import android.os.Bundle;\n+import android.os.Handler;\n import android.support.v4.app.Fragment;\n import android.support.v4.app.FragmentManager;\n-import android.support.v4.app.FragmentTransaction;\n import android.support.v4.app.FragmentPagerAdapter;\n-import android.os.Bundle;\n+import android.support.v4.app.FragmentTransaction;\n import android.support.v4.view.ViewPager;\n-import android.view.Gravity;\n+import android.support.v4.widget.SwipeRefreshLayout;\n+import android.support.v7.app.ActionBar;\n+import android.support.v7.app.ActionBarActivity;\n import android.view.LayoutInflater;\n-import android.view.Menu;\n-import android.view.MenuItem;\n import android.view.View;\n import android.view.ViewGroup;\n+import android.widget.AbsListView;\n+import android.widget.ImageView;\n+import android.widget.ListView;\n+import android.widget.RelativeLayout;\n import android.widget.TextView;\n \n+import retrofit.Callback;\n+import retrofit.RetrofitError;\n+import retrofit.client.Response;\n \n-public class NewsActivity extends ActionBarActivity implements ActionBar.TabListener {\n-\n-    /**\n-     * The {@link android.support.v4.view.PagerAdapter} that will provide\n-     * fragments for each of the sections. We use a\n-     * {@link FragmentPagerAdapter} derivative, which will keep every\n-     * loaded fragment in memory. If this becomes too memory intensive, it\n-     * may be best to switch to a\n-     * {@link android.support.v4.app.FragmentStatePagerAdapter}.\n-     */\n-    SectionsPagerAdapter mSectionsPagerAdapter;\n \n-    /**\n-     * The {@link ViewPager} that will host the section contents.\n-     */\n-    ViewPager mViewPager;\n+public class NewsActivity extends ActionBarActivity implements ActionBar.TabListener {\n+    private ViewPager mViewPager;\n+    private ActionBar mActionBar;\n \n     @Override\n     protected void onCreate(Bundle savedInstanceState) {\n         super.onCreate(savedInstanceState);\n         setContentView(R.layout.activity_news);\n+        setUI();\n+        setActionBar();\n+        setBehavior();\n+    }\n \n-        // Set up the action bar.\n-        final ActionBar actionBar = getSupportActionBar();\n-        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);\n-\n-        // Create the adapter that will return a fragment for each of the three\n-        // primary sections of the activity.\n-        mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());\n+    private void setUI() {\n+        SectionsPagerAdapter mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());\n \n-        // Set up the ViewPager with the sections adapter.\n         mViewPager = (ViewPager) findViewById(R.id.pager);\n         mViewPager.setAdapter(mSectionsPagerAdapter);\n+    }\n \n-        // When swiping between different sections, select the corresponding\n-        // tab. We can also use ActionBar.Tab#select() to do this if we have\n-        // a reference to the Tab.\n+    private void setBehavior() {\n         mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {\n             @Override\n             public void onPageSelected(int position) {\n-                actionBar.setSelectedNavigationItem(position);\n+                mActionBar.setSelectedNavigationItem(position);\n             }\n         });\n+    }\n \n-        // For each of the sections in the app, add a tab to the action bar.\n-        for (int i = 0; i < mSectionsPagerAdapter.getCount(); i++) {\n-            // Create a tab with text corresponding to the page title defined by\n-            // the adapter. Also specify this Activity object, which implements\n-            // the TabListener interface, as the callback (listener) for when\n-            // this tab is selected.\n-            actionBar.addTab(\n-                    actionBar.newTab()\n-                            .setText(mSectionsPagerAdapter.getPageTitle(i))\n-                            .setTabListener(this));\n-        }\n+    private void setActionBar() {\n+        mActionBar = getSupportActionBar();\n+        mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);\n+        mActionBar.setLogo(R.drawable.topbar_logo);\n+        mActionBar.setDisplayShowHomeEnabled(true);\n+        mActionBar.setDisplayUseLogoEnabled(true);\n+        mActionBar.addTab(createTab(getString(R.string.title_section1), R.drawable._0003_news_on));\n+        mActionBar.addTab(createTab(getString(R.string.title_section2), R.drawable._0002_profile_off));\n     }\n \n+    private ActionBar.Tab createTab(String titleText, int tabIcon) {\n+        ActionBar.Tab tab = getSupportActionBar().newTab();\n+        RelativeLayout rl = (RelativeLayout) this.getLayoutInflater().inflate(R.layout.tab_news, null, false);","path":"app/src/main/java/com/example/iojananchervonagura/woloxtraining/NewsActivity.java","position":117,"original_position":117,"commit_id":"dbbad6ab7a30e121437e61c5f77c5de9e3470705","original_commit_id":"dbbad6ab7a30e121437e61c5f77c5de9e3470705","user":{"login":"ConcoMB","id":1123168,"avatar_url":"https://avatars.githubusercontent.com/u/1123168?v=3","gravatar_id":"","url":"https://api.github.com/users/ConcoMB","html_url":"https://github.com/ConcoMB","followers_url":"https://api.github.com/users/ConcoMB/followers","following_url":"https://api.github.com/users/ConcoMB/following{/other_user}","gists_url":"https://api.github.com/users/ConcoMB/gists{/gist_id}","starred_url":"https://api.github.com/users/ConcoMB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConcoMB/subscriptions","organizations_url":"https://api.github.com/users/ConcoMB/orgs","repos_url":"https://api.github.com/users/ConcoMB/repos","events_url":"https://api.github.com/users/ConcoMB/events{/privacy}","received_events_url":"https://api.github.com/users/ConcoMB/received_events","type":"User","site_admin":false},"body":"long","created_at":"2015-03-31T12:46:40Z","updated_at":"2015-03-31T12:46:40Z","html_url":"https://github.com/iojichervo/WoloxTraining/pull/3#discussion_r27475083","pull_request_url":"https://api.github.com/repos/iojichervo/WoloxTraining/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/iojichervo/WoloxTraining/pulls/comments/27475083"},"html":{"href":"https://github.com/iojichervo/WoloxTraining/pull/3#discussion_r27475083"},"pull_request":{"href":"https://api.github.com/repos/iojichervo/WoloxTraining/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/iojichervo/WoloxTraining/pulls/3","id":32245295,"html_url":"https://github.com/iojichervo/WoloxTraining/pull/3","diff_url":"https://github.com/iojichervo/WoloxTraining/pull/3.diff","patch_url":"https://github.com/iojichervo/WoloxTraining/pull/3.patch","issue_url":"https://api.github.com/repos/iojichervo/WoloxTraining/issues/3","number":3,"state":"open","locked":false,"title":"Newsactivity","user":{"login":"iojichervo","id":4504777,"avatar_url":"https://avatars.githubusercontent.com/u/4504777?v=3","gravatar_id":"","url":"https://api.github.com/users/iojichervo","html_url":"https://github.com/iojichervo","followers_url":"https://api.github.com/users/iojichervo/followers","following_url":"https://api.github.com/users/iojichervo/following{/other_user}","gists_url":"https://api.github.com/users/iojichervo/gists{/gist_id}","starred_url":"https://api.github.com/users/iojichervo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iojichervo/subscriptions","organizations_url":"https://api.github.com/users/iojichervo/orgs","repos_url":"https://api.github.com/users/iojichervo/repos","events_url":"https://api.github.com/users/iojichervo/events{/privacy}","received_events_url":"https://api.github.com/users/iojichervo/received_events","type":"User","site_admin":false},"body":"Summary: Actividad (fragment en realidad) que muestra las noticias creadas, permitiendo marcar como favorito alguna y hacer un refresh para noticias nuevas.\r\n\r\nTest Plan: Crear, cambiar y borrar noticias manualmente (actualmente solo se podria con http request directo con curl). Marcar varias como favoritas, refrescar, salir, y volver a cargar, verficar que se mantengan consistentes.\r\n\r\n![news](https://cloud.githubusercontent.com/assets/4504777/6901496/fdd73ee6-d6e3-11e4-8545-88de18c90488.png)\r\n","created_at":"2015-03-30T16:52:37Z","updated_at":"2015-03-31T12:46:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"ConcoMB","id":1123168,"avatar_url":"https://avatars.githubusercontent.com/u/1123168?v=3","gravatar_id":"","url":"https://api.github.com/users/ConcoMB","html_url":"https://github.com/ConcoMB","followers_url":"https://api.github.com/users/ConcoMB/followers","following_url":"https://api.github.com/users/ConcoMB/following{/other_user}","gists_url":"https://api.github.com/users/ConcoMB/gists{/gist_id}","starred_url":"https://api.github.com/users/ConcoMB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConcoMB/subscriptions","organizations_url":"https://api.github.com/users/ConcoMB/orgs","repos_url":"https://api.github.com/users/ConcoMB/repos","events_url":"https://api.github.com/users/ConcoMB/events{/privacy}","received_events_url":"https://api.github.com/users/ConcoMB/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/iojichervo/WoloxTraining/pulls/3/commits","review_comments_url":"https://api.github.com/repos/iojichervo/WoloxTraining/pulls/3/comments","review_comment_url":"https://api.github.com/repos/iojichervo/WoloxTraining/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iojichervo/WoloxTraining/issues/3/comments","statuses_url":"https://api.github.com/repos/iojichervo/WoloxTraining/statuses/dbbad6ab7a30e121437e61c5f77c5de9e3470705","head":{"label":"iojichervo:newsactivity","ref":"newsactivity","sha":"dbbad6ab7a30e121437e61c5f77c5de9e3470705","user":{"login":"iojichervo","id":4504777,"avatar_url":"https://avatars.githubusercontent.com/u/4504777?v=3","gravatar_id":"","url":"https://api.github.com/users/iojichervo","html_url":"https://github.com/iojichervo","followers_url":"https://api.github.com/users/iojichervo/followers","following_url":"https://api.github.com/users/iojichervo/following{/other_user}","gists_url":"https://api.github.com/users/iojichervo/gists{/gist_id}","starred_url":"https://api.github.com/users/iojichervo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iojichervo/subscriptions","organizations_url":"https://api.github.com/users/iojichervo/orgs","repos_url":"https://api.github.com/users/iojichervo/repos","events_url":"https://api.github.com/users/iojichervo/events{/privacy}","received_events_url":"https://api.github.com/users/iojichervo/received_events","type":"User","site_admin":false},"repo":{"id":32927170,"name":"WoloxTraining","full_name":"iojichervo/WoloxTraining","owner":{"login":"iojichervo","id":4504777,"avatar_url":"https://avatars.githubusercontent.com/u/4504777?v=3","gravatar_id":"","url":"https://api.github.com/users/iojichervo","html_url":"https://github.com/iojichervo","followers_url":"https://api.github.com/users/iojichervo/followers","following_url":"https://api.github.com/users/iojichervo/following{/other_user}","gists_url":"https://api.github.com/users/iojichervo/gists{/gist_id}","starred_url":"https://api.github.com/users/iojichervo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iojichervo/subscriptions","organizations_url":"https://api.github.com/users/iojichervo/orgs","repos_url":"https://api.github.com/users/iojichervo/repos","events_url":"https://api.github.com/users/iojichervo/events{/privacy}","received_events_url":"https://api.github.com/users/iojichervo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iojichervo/WoloxTraining","description":"","fork":false,"url":"https://api.github.com/repos/iojichervo/WoloxTraining","forks_url":"https://api.github.com/repos/iojichervo/WoloxTraining/forks","keys_url":"https://api.github.com/repos/iojichervo/WoloxTraining/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iojichervo/WoloxTraining/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iojichervo/WoloxTraining/teams","hooks_url":"https://api.github.com/repos/iojichervo/WoloxTraining/hooks","issue_events_url":"https://api.github.com/repos/iojichervo/WoloxTraining/issues/events{/number}","events_url":"https://api.github.com/repos/iojichervo/WoloxTraining/events","assignees_url":"https://api.github.com/repos/iojichervo/WoloxTraining/assignees{/user}","branches_url":"https://api.github.com/repos/iojichervo/WoloxTraining/branches{/branch}","tags_url":"https://api.github.com/repos/iojichervo/WoloxTraining/tags","blobs_url":"https://api.github.com/repos/iojichervo/WoloxTraining/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iojichervo/WoloxTraining/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iojichervo/WoloxTraining/git/refs{/sha}","trees_url":"https://api.github.com/repos/iojichervo/WoloxTraining/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iojichervo/WoloxTraining/statuses/{sha}","languages_url":"https://api.github.com/repos/iojichervo/WoloxTraining/languages","stargazers_url":"https://api.github.com/repos/iojichervo/WoloxTraining/stargazers","contributors_url":"https://api.github.com/repos/iojichervo/WoloxTraining/contributors","subscribers_url":"https://api.github.com/repos/iojichervo/WoloxTraining/subscribers","subscription_url":"https://api.github.com/repos/iojichervo/WoloxTraining/subscription","commits_url":"https://api.github.com/repos/iojichervo/WoloxTraining/commits{/sha}","git_commits_url":"https://api.github.com/repos/iojichervo/WoloxTraining/git/commits{/sha}","comments_url":"https://api.github.com/repos/iojichervo/WoloxTraining/comments{/number}","issue_comment_url":"https://api.github.com/repos/iojichervo/WoloxTraining/issues/comments{/number}","contents_url":"https://api.github.com/repos/iojichervo/WoloxTraining/contents/{+path}","compare_url":"https://api.github.com/repos/iojichervo/WoloxTraining/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iojichervo/WoloxTraining/merges","archive_url":"https://api.github.com/repos/iojichervo/WoloxTraining/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iojichervo/WoloxTraining/downloads","issues_url":"https://api.github.com/repos/iojichervo/WoloxTraining/issues{/number}","pulls_url":"https://api.github.com/repos/iojichervo/WoloxTraining/pulls{/number}","milestones_url":"https://api.github.com/repos/iojichervo/WoloxTraining/milestones{/number}","notifications_url":"https://api.github.com/repos/iojichervo/WoloxTraining/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iojichervo/WoloxTraining/labels{/name}","releases_url":"https://api.github.com/repos/iojichervo/WoloxTraining/releases{/id}","created_at":"2015-03-26T12:52:57Z","updated_at":"2015-03-30T12:35:59Z","pushed_at":"2015-03-30T16:52:37Z","git_url":"git://github.com/iojichervo/WoloxTraining.git","ssh_url":"git@github.com:iojichervo/WoloxTraining.git","clone_url":"https://github.com/iojichervo/WoloxTraining.git","svn_url":"https://github.com/iojichervo/WoloxTraining","homepage":null,"size":0,"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":"iojichervo:master","ref":"master","sha":"c8457ddac457197993f530e7466b65d93137582e","user":{"login":"iojichervo","id":4504777,"avatar_url":"https://avatars.githubusercontent.com/u/4504777?v=3","gravatar_id":"","url":"https://api.github.com/users/iojichervo","html_url":"https://github.com/iojichervo","followers_url":"https://api.github.com/users/iojichervo/followers","following_url":"https://api.github.com/users/iojichervo/following{/other_user}","gists_url":"https://api.github.com/users/iojichervo/gists{/gist_id}","starred_url":"https://api.github.com/users/iojichervo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iojichervo/subscriptions","organizations_url":"https://api.github.com/users/iojichervo/orgs","repos_url":"https://api.github.com/users/iojichervo/repos","events_url":"https://api.github.com/users/iojichervo/events{/privacy}","received_events_url":"https://api.github.com/users/iojichervo/received_events","type":"User","site_admin":false},"repo":{"id":32927170,"name":"WoloxTraining","full_name":"iojichervo/WoloxTraining","owner":{"login":"iojichervo","id":4504777,"avatar_url":"https://avatars.githubusercontent.com/u/4504777?v=3","gravatar_id":"","url":"https://api.github.com/users/iojichervo","html_url":"https://github.com/iojichervo","followers_url":"https://api.github.com/users/iojichervo/followers","following_url":"https://api.github.com/users/iojichervo/following{/other_user}","gists_url":"https://api.github.com/users/iojichervo/gists{/gist_id}","starred_url":"https://api.github.com/users/iojichervo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iojichervo/subscriptions","organizations_url":"https://api.github.com/users/iojichervo/orgs","repos_url":"https://api.github.com/users/iojichervo/repos","events_url":"https://api.github.com/users/iojichervo/events{/privacy}","received_events_url":"https://api.github.com/users/iojichervo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iojichervo/WoloxTraining","description":"","fork":false,"url":"https://api.github.com/repos/iojichervo/WoloxTraining","forks_url":"https://api.github.com/repos/iojichervo/WoloxTraining/forks","keys_url":"https://api.github.com/repos/iojichervo/WoloxTraining/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iojichervo/WoloxTraining/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iojichervo/WoloxTraining/teams","hooks_url":"https://api.github.com/repos/iojichervo/WoloxTraining/hooks","issue_events_url":"https://api.github.com/repos/iojichervo/WoloxTraining/issues/events{/number}","events_url":"https://api.github.com/repos/iojichervo/WoloxTraining/events","assignees_url":"https://api.github.com/repos/iojichervo/WoloxTraining/assignees{/user}","branches_url":"https://api.github.com/repos/iojichervo/WoloxTraining/branches{/branch}","tags_url":"https://api.github.com/repos/iojichervo/WoloxTraining/tags","blobs_url":"https://api.github.com/repos/iojichervo/WoloxTraining/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iojichervo/WoloxTraining/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iojichervo/WoloxTraining/git/refs{/sha}","trees_url":"https://api.github.com/repos/iojichervo/WoloxTraining/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iojichervo/WoloxTraining/statuses/{sha}","languages_url":"https://api.github.com/repos/iojichervo/WoloxTraining/languages","stargazers_url":"https://api.github.com/repos/iojichervo/WoloxTraining/stargazers","contributors_url":"https://api.github.com/repos/iojichervo/WoloxTraining/contributors","subscribers_url":"https://api.github.com/repos/iojichervo/WoloxTraining/subscribers","subscription_url":"https://api.github.com/repos/iojichervo/WoloxTraining/subscription","commits_url":"https://api.github.com/repos/iojichervo/WoloxTraining/commits{/sha}","git_commits_url":"https://api.github.com/repos/iojichervo/WoloxTraining/git/commits{/sha}","comments_url":"https://api.github.com/repos/iojichervo/WoloxTraining/comments{/number}","issue_comment_url":"https://api.github.com/repos/iojichervo/WoloxTraining/issues/comments{/number}","contents_url":"https://api.github.com/repos/iojichervo/WoloxTraining/contents/{+path}","compare_url":"https://api.github.com/repos/iojichervo/WoloxTraining/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iojichervo/WoloxTraining/merges","archive_url":"https://api.github.com/repos/iojichervo/WoloxTraining/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iojichervo/WoloxTraining/downloads","issues_url":"https://api.github.com/repos/iojichervo/WoloxTraining/issues{/number}","pulls_url":"https://api.github.com/repos/iojichervo/WoloxTraining/pulls{/number}","milestones_url":"https://api.github.com/repos/iojichervo/WoloxTraining/milestones{/number}","notifications_url":"https://api.github.com/repos/iojichervo/WoloxTraining/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iojichervo/WoloxTraining/labels{/name}","releases_url":"https://api.github.com/repos/iojichervo/WoloxTraining/releases{/id}","created_at":"2015-03-26T12:52:57Z","updated_at":"2015-03-30T12:35:59Z","pushed_at":"2015-03-30T16:52:37Z","git_url":"git://github.com/iojichervo/WoloxTraining.git","ssh_url":"git@github.com:iojichervo/WoloxTraining.git","clone_url":"https://github.com/iojichervo/WoloxTraining.git","svn_url":"https://github.com/iojichervo/WoloxTraining","homepage":null,"size":0,"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/iojichervo/WoloxTraining/pulls/3"},"html":{"href":"https://github.com/iojichervo/WoloxTraining/pull/3"},"issue":{"href":"https://api.github.com/repos/iojichervo/WoloxTraining/issues/3"},"comments":{"href":"https://api.github.com/repos/iojichervo/WoloxTraining/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/iojichervo/WoloxTraining/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/iojichervo/WoloxTraining/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iojichervo/WoloxTraining/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/iojichervo/WoloxTraining/statuses/dbbad6ab7a30e121437e61c5f77c5de9e3470705"}}}}