Search in sources :

Example 1 with ReleasePagerAdapter

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

the class ReleaseActivity method configurePager.

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

Aggregations

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