use of com.shiming.andrioddesignpattern.ui.TemplateModelFragment in project AndriodDesignPattern by Shimingli.
the class BehaviorModelActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.behavioral_model_activity_layout);
ViewPager pager = (ViewPager) findViewById(R.id.viewpager);
SlidingTabLayout tab = (SlidingTabLayout) findViewById(R.id.tap);
mTitles = new String[] { this.getResources().getString(R.string.all_order_tab16), this.getResources().getString(R.string.all_order_tab17), this.getResources().getString(R.string.all_order_tab18), this.getResources().getString(R.string.all_order_tab19), this.getResources().getString(R.string.all_order_tab20), this.getResources().getString(R.string.all_order_tab21), this.getResources().getString(R.string.all_order_tab22), this.getResources().getString(R.string.all_order_tab23), this.getResources().getString(R.string.all_order_tab24), this.getResources().getString(R.string.all_order_tab25) };
mFragments.add(new StrategyModelFragment());
mFragments.add(new TemplateModelFragment());
mFragments.add(new ObserverModelFragment());
mFragments.add(new IteratorModelFragment());
mFragments.add(new ChainOfResponsibilityFragment());
mFragments.add(new CommandPatternModelFragment());
mFragments.add(new MementoModelFragment());
mFragments.add(new StateModelFragment());
mFragments.add(new VisitorPatternModelFragment());
mFragments.add(new MediatorPatternModelFragment());
mAdapter = new MyPagerAdapter(getSupportFragmentManager());
pager.setAdapter(mAdapter);
tab.setViewPager(pager);
}
Aggregations