{"action":"created","comment":{"url":"https://api.github.com/repos/leonardo2204/android-material-stepper/pulls/comments/93144209","pull_request_review_id":13666325,"id":93144209,"diff_hunk":"@@ -1,19 +1,49 @@\n package com.stepstone.stepper.adapter;\n \n import android.support.v4.view.PagerAdapter;\n+import android.support.v4.view.ViewPager;\n+import android.view.View;\n+import android.view.ViewGroup;\n \n import com.stepstone.stepper.Step;\n \n-/**\n- * Created by leonardo on 18/12/16.\n- */\n+import java.util.LinkedList;\n+import java.util.List;\n \n /**\n  * A base adapter class which returns step to use inside of the {@link com.stepstone.stepper.StepperLayout}.\n  * This class is intended to be inherited if you need to use {@link com.stepstone.stepper.StepperLayout} without fragments.\n- * Otherwise, you should use {@link AbstractStepAdapter}\n+ * Otherwise, you should use {@link AbstractFragmentStepAdapter}\n  */\n-public abstract class AbstractStepAdapter<T extends Step> extends PagerAdapter implements StepAdapter<T> {\n+public abstract class AbstractStepAdapter extends PagerAdapter implements StepAdapter {\n+\n+    private List<Step> pages = new LinkedList<>();\n+\n+    @Override\n+    public Step findStep(ViewPager viewPager, int position) {\n+        return pages.size() > 0 ? pages.get(position) : null;\n+    }\n+\n+    @Override\n+    public final View instantiateItem(ViewGroup container, int position) {","path":"material-stepper/src/main/java/com/stepstone/stepper/adapter/AbstractStepAdapter.java","position":33,"original_position":33,"commit_id":"ca3c07a215fcf244736eac98c513098c21239c92","original_commit_id":"ca3c07a215fcf244736eac98c513098c21239c92","user":{"login":"leonardo2204","id":1509421,"avatar_url":"https://avatars.githubusercontent.com/u/1509421?v=3","gravatar_id":"","url":"https://api.github.com/users/leonardo2204","html_url":"https://github.com/leonardo2204","followers_url":"https://api.github.com/users/leonardo2204/followers","following_url":"https://api.github.com/users/leonardo2204/following{/other_user}","gists_url":"https://api.github.com/users/leonardo2204/gists{/gist_id}","starred_url":"https://api.github.com/users/leonardo2204/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonardo2204/subscriptions","organizations_url":"https://api.github.com/users/leonardo2204/orgs","repos_url":"https://api.github.com/users/leonardo2204/repos","events_url":"https://api.github.com/users/leonardo2204/events{/privacy}","received_events_url":"https://api.github.com/users/leonardo2204/received_events","type":"User","site_admin":false},"body":"I'm not sure if I'd implement this like that. I use Conductor in most of my project, so this implementation would be different, like this: [https://github.com/bluelinelabs/Conductor/blob/develop/conductor-support/src/main/java/com/bluelinelabs/conductor/support/ControllerPagerAdapter.java](https://github.com/bluelinelabs/Conductor/blob/develop/conductor-support/src/main/java/com/bluelinelabs/conductor/support/ControllerPagerAdapter.java)\r\nSince you marked this as final, that would be an issue here. \r\nI'd go with the abstract here to be more flexible.\r\n","created_at":"2016-12-19T23:39:15Z","updated_at":"2016-12-19T23:46:53Z","html_url":"https://github.com/leonardo2204/android-material-stepper/pull/1#discussion_r93144209","pull_request_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/leonardo2204/android-material-stepper/pulls/comments/93144209"},"html":{"href":"https://github.com/leonardo2204/android-material-stepper/pull/1#discussion_r93144209"},"pull_request":{"href":"https://api.github.com/repos/leonardo2204/android-material-stepper/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/leonardo2204/android-material-stepper/pulls/1","id":98645920,"html_url":"https://github.com/leonardo2204/android-material-stepper/pull/1","diff_url":"https://github.com/leonardo2204/android-material-stepper/pull/1.diff","patch_url":"https://github.com/leonardo2204/android-material-stepper/pull/1.patch","issue_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/issues/1","number":1,"state":"open","locked":false,"title":"refactorings for https://github.com/stepstone-tech/android-material-stepper/pull/37","user":{"login":"zawadz88","id":3322260,"avatar_url":"https://avatars.githubusercontent.com/u/3322260?v=3","gravatar_id":"","url":"https://api.github.com/users/zawadz88","html_url":"https://github.com/zawadz88","followers_url":"https://api.github.com/users/zawadz88/followers","following_url":"https://api.github.com/users/zawadz88/following{/other_user}","gists_url":"https://api.github.com/users/zawadz88/gists{/gist_id}","starred_url":"https://api.github.com/users/zawadz88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zawadz88/subscriptions","organizations_url":"https://api.github.com/users/zawadz88/orgs","repos_url":"https://api.github.com/users/zawadz88/repos","events_url":"https://api.github.com/users/zawadz88/events{/privacy}","received_events_url":"https://api.github.com/users/zawadz88/received_events","type":"User","site_admin":false},"body":"Hi, please review these changes.\r\nI've moved some of the methods to AbstractPagerAdapter & changed the generic types across the lib a bit.","created_at":"2016-12-19T21:47:28Z","updated_at":"2016-12-19T23:46:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"add3fc3b7ccb0c49b84a9c67cea612ccfa2653e7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/pulls/1/commits","review_comments_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/pulls/1/comments","review_comment_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/issues/1/comments","statuses_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/statuses/ca3c07a215fcf244736eac98c513098c21239c92","head":{"label":"zawadz88:master","ref":"master","sha":"ca3c07a215fcf244736eac98c513098c21239c92","user":{"login":"zawadz88","id":3322260,"avatar_url":"https://avatars.githubusercontent.com/u/3322260?v=3","gravatar_id":"","url":"https://api.github.com/users/zawadz88","html_url":"https://github.com/zawadz88","followers_url":"https://api.github.com/users/zawadz88/followers","following_url":"https://api.github.com/users/zawadz88/following{/other_user}","gists_url":"https://api.github.com/users/zawadz88/gists{/gist_id}","starred_url":"https://api.github.com/users/zawadz88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zawadz88/subscriptions","organizations_url":"https://api.github.com/users/zawadz88/orgs","repos_url":"https://api.github.com/users/zawadz88/repos","events_url":"https://api.github.com/users/zawadz88/events{/privacy}","received_events_url":"https://api.github.com/users/zawadz88/received_events","type":"User","site_admin":false},"repo":{"id":76897663,"name":"android-material-stepper","full_name":"zawadz88/android-material-stepper","owner":{"login":"zawadz88","id":3322260,"avatar_url":"https://avatars.githubusercontent.com/u/3322260?v=3","gravatar_id":"","url":"https://api.github.com/users/zawadz88","html_url":"https://github.com/zawadz88","followers_url":"https://api.github.com/users/zawadz88/followers","following_url":"https://api.github.com/users/zawadz88/following{/other_user}","gists_url":"https://api.github.com/users/zawadz88/gists{/gist_id}","starred_url":"https://api.github.com/users/zawadz88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zawadz88/subscriptions","organizations_url":"https://api.github.com/users/zawadz88/orgs","repos_url":"https://api.github.com/users/zawadz88/repos","events_url":"https://api.github.com/users/zawadz88/events{/privacy}","received_events_url":"https://api.github.com/users/zawadz88/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zawadz88/android-material-stepper","description":"This library allows to use Material steppers inside Android applications.","fork":true,"url":"https://api.github.com/repos/zawadz88/android-material-stepper","forks_url":"https://api.github.com/repos/zawadz88/android-material-stepper/forks","keys_url":"https://api.github.com/repos/zawadz88/android-material-stepper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zawadz88/android-material-stepper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zawadz88/android-material-stepper/teams","hooks_url":"https://api.github.com/repos/zawadz88/android-material-stepper/hooks","issue_events_url":"https://api.github.com/repos/zawadz88/android-material-stepper/issues/events{/number}","events_url":"https://api.github.com/repos/zawadz88/android-material-stepper/events","assignees_url":"https://api.github.com/repos/zawadz88/android-material-stepper/assignees{/user}","branches_url":"https://api.github.com/repos/zawadz88/android-material-stepper/branches{/branch}","tags_url":"https://api.github.com/repos/zawadz88/android-material-stepper/tags","blobs_url":"https://api.github.com/repos/zawadz88/android-material-stepper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zawadz88/android-material-stepper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zawadz88/android-material-stepper/git/refs{/sha}","trees_url":"https://api.github.com/repos/zawadz88/android-material-stepper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zawadz88/android-material-stepper/statuses/{sha}","languages_url":"https://api.github.com/repos/zawadz88/android-material-stepper/languages","stargazers_url":"https://api.github.com/repos/zawadz88/android-material-stepper/stargazers","contributors_url":"https://api.github.com/repos/zawadz88/android-material-stepper/contributors","subscribers_url":"https://api.github.com/repos/zawadz88/android-material-stepper/subscribers","subscription_url":"https://api.github.com/repos/zawadz88/android-material-stepper/subscription","commits_url":"https://api.github.com/repos/zawadz88/android-material-stepper/commits{/sha}","git_commits_url":"https://api.github.com/repos/zawadz88/android-material-stepper/git/commits{/sha}","comments_url":"https://api.github.com/repos/zawadz88/android-material-stepper/comments{/number}","issue_comment_url":"https://api.github.com/repos/zawadz88/android-material-stepper/issues/comments{/number}","contents_url":"https://api.github.com/repos/zawadz88/android-material-stepper/contents/{+path}","compare_url":"https://api.github.com/repos/zawadz88/android-material-stepper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zawadz88/android-material-stepper/merges","archive_url":"https://api.github.com/repos/zawadz88/android-material-stepper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zawadz88/android-material-stepper/downloads","issues_url":"https://api.github.com/repos/zawadz88/android-material-stepper/issues{/number}","pulls_url":"https://api.github.com/repos/zawadz88/android-material-stepper/pulls{/number}","milestones_url":"https://api.github.com/repos/zawadz88/android-material-stepper/milestones{/number}","notifications_url":"https://api.github.com/repos/zawadz88/android-material-stepper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zawadz88/android-material-stepper/labels{/name}","releases_url":"https://api.github.com/repos/zawadz88/android-material-stepper/releases{/id}","deployments_url":"https://api.github.com/repos/zawadz88/android-material-stepper/deployments","created_at":"2016-12-19T21:12:39Z","updated_at":"2016-12-19T21:12:41Z","pushed_at":"2016-12-19T21:43:35Z","git_url":"git://github.com/zawadz88/android-material-stepper.git","ssh_url":"git@github.com:zawadz88/android-material-stepper.git","clone_url":"https://github.com/zawadz88/android-material-stepper.git","svn_url":"https://github.com/zawadz88/android-material-stepper","homepage":null,"size":29232,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"leonardo2204:master","ref":"master","sha":"401f6fb57783c08771cb3b58b1891ffdc12a06ff","user":{"login":"leonardo2204","id":1509421,"avatar_url":"https://avatars.githubusercontent.com/u/1509421?v=3","gravatar_id":"","url":"https://api.github.com/users/leonardo2204","html_url":"https://github.com/leonardo2204","followers_url":"https://api.github.com/users/leonardo2204/followers","following_url":"https://api.github.com/users/leonardo2204/following{/other_user}","gists_url":"https://api.github.com/users/leonardo2204/gists{/gist_id}","starred_url":"https://api.github.com/users/leonardo2204/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonardo2204/subscriptions","organizations_url":"https://api.github.com/users/leonardo2204/orgs","repos_url":"https://api.github.com/users/leonardo2204/repos","events_url":"https://api.github.com/users/leonardo2204/events{/privacy}","received_events_url":"https://api.github.com/users/leonardo2204/received_events","type":"User","site_admin":false},"repo":{"id":76404335,"name":"android-material-stepper","full_name":"leonardo2204/android-material-stepper","owner":{"login":"leonardo2204","id":1509421,"avatar_url":"https://avatars.githubusercontent.com/u/1509421?v=3","gravatar_id":"","url":"https://api.github.com/users/leonardo2204","html_url":"https://github.com/leonardo2204","followers_url":"https://api.github.com/users/leonardo2204/followers","following_url":"https://api.github.com/users/leonardo2204/following{/other_user}","gists_url":"https://api.github.com/users/leonardo2204/gists{/gist_id}","starred_url":"https://api.github.com/users/leonardo2204/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonardo2204/subscriptions","organizations_url":"https://api.github.com/users/leonardo2204/orgs","repos_url":"https://api.github.com/users/leonardo2204/repos","events_url":"https://api.github.com/users/leonardo2204/events{/privacy}","received_events_url":"https://api.github.com/users/leonardo2204/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/leonardo2204/android-material-stepper","description":"This library allows to use Material steppers inside Android applications.","fork":true,"url":"https://api.github.com/repos/leonardo2204/android-material-stepper","forks_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/forks","keys_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/teams","hooks_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/hooks","issue_events_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/issues/events{/number}","events_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/events","assignees_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/assignees{/user}","branches_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/branches{/branch}","tags_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/tags","blobs_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/git/refs{/sha}","trees_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/statuses/{sha}","languages_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/languages","stargazers_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/stargazers","contributors_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/contributors","subscribers_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/subscribers","subscription_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/subscription","commits_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/commits{/sha}","git_commits_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/git/commits{/sha}","comments_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/comments{/number}","issue_comment_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/issues/comments{/number}","contents_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/contents/{+path}","compare_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/merges","archive_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/downloads","issues_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/issues{/number}","pulls_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/pulls{/number}","milestones_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/milestones{/number}","notifications_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/labels{/name}","releases_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/releases{/id}","deployments_url":"https://api.github.com/repos/leonardo2204/android-material-stepper/deployments","created_at":"2016-12-13T22:37:38Z","updated_at":"2016-12-13T22:37:40Z","pushed_at":"2016-12-19T21:47:29Z","git_url":"git://github.com/leonardo2204/android-material-stepper.git","ssh_url":"git@github.com:leonardo2204/android-material-stepper.git","clone_url":"https://github.com/leonardo2204/android-material-stepper.git","svn_url":"https://github.com/leonardo2204/android-material-stepper","homepage":null,"size":29218,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/leonardo2204/android-material-stepper/pulls/1"},"html":{"href":"https://github.com/leonardo2204/android-material-stepper/pull/1"},"issue":{"href":"https://api.github.com/repos/leonardo2204/android-material-stepper/issues/1"},"comments":{"href":"https://api.github.com/repos/leonardo2204/android-material-stepper/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/leonardo2204/android-material-stepper/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/leonardo2204/android-material-stepper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/leonardo2204/android-material-stepper/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/leonardo2204/android-material-stepper/statuses/ca3c07a215fcf244736eac98c513098c21239c92"}}}}
{"actor":{"display_login":"leonardo2204"}}