use of com.vanco.abplayer.adapter.MainTabAdapter in project ABPlayer by winkstu.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
// 无标题
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
FragmentPagerAdapter adapter = new MainTabAdapter(getSupportFragmentManager());
// 视图切换器
ViewPager pager = (ViewPager) findViewById(R.id.pager);
pager.setOffscreenPageLimit(1);
pager.setAdapter(adapter);
// 页面指示器
PageIndicator indicator = (PageIndicator) findViewById(R.id.indicator);
indicator.setViewPager(pager);
/*if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction()
.add(R.id.container, new SubareaFragment())
.commit();
}*/
AdManager.getInstance(this).init("118250e2aa39dea9", "bc5f4490f33da8e6", false);
SpotManager.getInstance(this).loadSpotAds();
SpotManager.getInstance(this).setAnimationType(SpotManager.ANIM_ADVANCE);
SpotManager.getInstance(this).setSpotOrientation(SpotManager.ORIENTATION_PORTRAIT);
AdManager.getInstance(this).setUserDataCollect(true);
}
Aggregations