use of com.viewpagerindicator.TabPageIndicator in project cw-omnibus by commonsguy.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TabPageIndicator tabs = (TabPageIndicator) findViewById(R.id.titles);
pager = (ViewPager) findViewById(R.id.pager);
adapter = new SlidesAdapter(this);
pager.setAdapter(adapter);
tabs.setViewPager(pager);
tabs.setOnPageChangeListener(this);
helper = new PresentationHelper(this, this);
}
use of com.viewpagerindicator.TabPageIndicator 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);
}
use of com.viewpagerindicator.TabPageIndicator 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);
}
use of com.viewpagerindicator.TabPageIndicator in project musicbrainz-android by jdamcd.
the class SearchActivity method enableResultTabs.
private void enableResultTabs() {
setContentView(R.layout.activity_search_all);
SearchPagerAdapter adapter = new SearchPagerAdapter(this);
ViewPager pager = (ViewPager) findViewById(R.id.pager);
pager.setAdapter(adapter);
TabPageIndicator indicator = (TabPageIndicator) findViewById(R.id.indicator);
indicator.setViewPager(pager);
}
use of com.viewpagerindicator.TabPageIndicator in project glimmr by brk3.
the class PhotoInfoFragment method initViewPager.
private void initViewPager() {
ViewPager viewPager = (ViewPager) mLayout.findViewById(R.id.viewPager);
/* http://stackoverflow.com/a/13684139/663370 */
GlimmrPagerAdapter adapter = new GlimmrPagerAdapter(getChildFragmentManager(), viewPager, mActivity.getActionBar(), CONTENT) {
@Override
public Fragment getItemImpl(int position) {
switch(position) {
case OVERVIEW_PAGE:
return PhotoOverviewFragment.newInstance(PhotoInfoFragment.this.mPhoto);
case MORE_PAGE:
return ExifInfoFragment.newInstance(PhotoInfoFragment.this.mPhoto);
}
return null;
}
};
viewPager.setAdapter(adapter);
PageIndicator indicator = (TabPageIndicator) mLayout.findViewById(R.id.indicator);
indicator.setViewPager(viewPager);
}
Aggregations