use of com.shiming.andrioddesignpattern.ui.CompositeModelFragment in project AndriodDesignPattern by Shimingli.
the class StructuralModelActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.structural_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_tab5), this.getResources().getString(R.string.all_order_tab10), this.getResources().getString(R.string.all_order_tab11), this.getResources().getString(R.string.all_order_tab12), this.getResources().getString(R.string.all_order_tab13), this.getResources().getString(R.string.all_order_tab14), this.getResources().getString(R.string.all_order_tab15) };
mFragments.add(new AdapterModelFragment());
mFragments.add(new DecoratorModelFragment());
mFragments.add(new ProxyModelFragment());
mFragments.add(new FacadeModelFragment());
mFragments.add(new BridgeModelFragment());
mFragments.add(new CompositeModelFragment());
mFragments.add(new FlyWeightModelFragment());
mAdapter = new MyPagerAdapter(getSupportFragmentManager());
pager.setAdapter(mAdapter);
tab.setViewPager(pager);
}
Aggregations