Search in sources :

Example 1 with ArtistPagerAdapter

use of org.musicbrainz.mobile.adapter.pager.ArtistPagerAdapter in project musicbrainz-android by jdamcd.

the class ArtistActivity method configurePager.

private void configurePager() {
    pagerAdapter = new ArtistPagerAdapter(getSupportFragmentManager());
    ViewPager pager = (ViewPager) findViewById(R.id.pager);
    pager.setAdapter(pagerAdapter);
    TabPageIndicator indicator = (TabPageIndicator) findViewById(R.id.indicator);
    indicator.setViewPager(pager);
    pager.setCurrentItem(1);
    pager.setOffscreenPageLimit(pagerAdapter.getCount() - 1);
}
Also used : TabPageIndicator(com.viewpagerindicator.TabPageIndicator) ArtistPagerAdapter(org.musicbrainz.mobile.adapter.pager.ArtistPagerAdapter) ViewPager(android.support.v4.view.ViewPager)

Aggregations

ViewPager (android.support.v4.view.ViewPager)1 TabPageIndicator (com.viewpagerindicator.TabPageIndicator)1 ArtistPagerAdapter (org.musicbrainz.mobile.adapter.pager.ArtistPagerAdapter)1