use of com.zype.android.ui.video_details.VideoDetailPagerAdapter in project zype-android by zype.
the class VideoDetailActivity method showSections.
private void showSections(String videoId) {
pagerSections = findViewById(R.id.pagerSections);
tabs = findViewById(R.id.tabs);
layoutSummary = findViewById(R.id.layoutSummary);
if (hasOptions(videoId)) {
pagerSections.setAdapter(new VideoDetailPagerAdapter(this, getSupportFragmentManager(), videoId));
tabs.setupWithViewPager(pagerSections);
pagerSections.setVisibility(View.VISIBLE);
tabs.setVisibility(View.VISIBLE);
layoutSummary.setVisibility(GONE);
} else {
pagerSections.setVisibility(GONE);
tabs.setVisibility(GONE);
layoutSummary.setVisibility(View.VISIBLE);
FragmentManager fm = getSupportFragmentManager();
Fragment fragment = SummaryFragment.newInstance();
fm.beginTransaction().replace(R.id.layoutSummary, fragment, SummaryFragment.TAG).commit();
}
}
Aggregations