Search in sources :

Example 1 with BridgeModelFragment

use of com.shiming.andrioddesignpattern.ui.BridgeModelFragment 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);
}
Also used : CompositeModelFragment(com.shiming.andrioddesignpattern.ui.CompositeModelFragment) SlidingTabLayout(com.flyco.tablayout.SlidingTabLayout) FlyWeightModelFragment(com.shiming.andrioddesignpattern.ui.FlyWeightModelFragment) FacadeModelFragment(com.shiming.andrioddesignpattern.ui.FacadeModelFragment) ViewPager(android.support.v4.view.ViewPager) DecoratorModelFragment(com.shiming.andrioddesignpattern.ui.DecoratorModelFragment) BridgeModelFragment(com.shiming.andrioddesignpattern.ui.BridgeModelFragment) AdapterModelFragment(com.shiming.andrioddesignpattern.ui.AdapterModelFragment) ProxyModelFragment(com.shiming.andrioddesignpattern.proxy_model.ProxyModelFragment)

Aggregations

ViewPager (android.support.v4.view.ViewPager)1 SlidingTabLayout (com.flyco.tablayout.SlidingTabLayout)1 ProxyModelFragment (com.shiming.andrioddesignpattern.proxy_model.ProxyModelFragment)1 AdapterModelFragment (com.shiming.andrioddesignpattern.ui.AdapterModelFragment)1 BridgeModelFragment (com.shiming.andrioddesignpattern.ui.BridgeModelFragment)1 CompositeModelFragment (com.shiming.andrioddesignpattern.ui.CompositeModelFragment)1 DecoratorModelFragment (com.shiming.andrioddesignpattern.ui.DecoratorModelFragment)1 FacadeModelFragment (com.shiming.andrioddesignpattern.ui.FacadeModelFragment)1 FlyWeightModelFragment (com.shiming.andrioddesignpattern.ui.FlyWeightModelFragment)1