Search in sources :

Example 1 with RepositoryListFragment

use of com.github.pockethub.android.ui.repo.RepositoryListFragment in project PocketHub by pockethub.

the class HomePagerAdapter method getItem.

@Override
public Fragment getItem(int position) {
    Fragment fragment = null;
    switch(position) {
        case 0:
            fragment = defaultUser ? new UserReceivedNewsFragment() : new OrganizationNewsFragment();
            break;
        case 1:
            fragment = new RepositoryListFragment();
            break;
        case 2:
            fragment = defaultUser ? new MyFollowersFragment() : new MembersFragment();
            break;
        case 3:
            fragment = new MyFollowingFragment();
            break;
    }
    if (fragment != null) {
        Bundle args = new Bundle();
        args.putParcelable("org", org);
        fragment.setArguments(args);
    }
    return fragment;
}
Also used : Bundle(android.os.Bundle) RepositoryListFragment(com.github.pockethub.android.ui.repo.RepositoryListFragment) Fragment(android.support.v4.app.Fragment) RepositoryListFragment(com.github.pockethub.android.ui.repo.RepositoryListFragment)

Aggregations

Bundle (android.os.Bundle)1 Fragment (android.support.v4.app.Fragment)1 RepositoryListFragment (com.github.pockethub.android.ui.repo.RepositoryListFragment)1