@Override
    public Fragment getItem(int position) {
        IssueFragment fragment = new IssueFragment();
        Bundle args = new Bundle();
        if (repo != null) {
            args.putString(EXTRA_REPOSITORY_NAME, repo.name());
            User owner = repo.owner();
            args.putString(EXTRA_REPOSITORY_OWNER, owner.login());
            args.putParcelable(EXTRA_USER, owner);
        } else {
            Repository repo = repos.get(position);
            args.putString(EXTRA_REPOSITORY_NAME, repo.name());
            args.putString(EXTRA_REPOSITORY_OWNER, repo.owner().login());
            Issue issue = store.getIssue(repo, issues[position]);
            if (issue != null && issue.user() != null) {
                Repository fullRepo = issue.repository();
                if (fullRepo != null && fullRepo.owner() != null) {
                    args.putParcelable(EXTRA_USER, fullRepo.owner());
                }
            }
        }
        args.putInt(EXTRA_ISSUE_NUMBER, issues[position]);
        args.putBoolean(EXTRA_CAN_WRITE_REPO, canWrite);
        fragment.setArguments(args);
        return fragment;
    }
@param activity
@param repository
@param issueNumbers
@param canWrite
app/src/main/java/com/github/pockethub/android/ui/issue/IssuesPagerAdapter.java