Search in sources :

Example 1 with ExampleDataProviderFragment

use of com.h6ah4i.android.example.advrecyclerview.common.fragment.ExampleDataProviderFragment in project android-advancedrecyclerview by h6ah4i.

the class ViewPagerSwipeableExampleActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_demo_viewpager);
    mTabLayout = (TabLayout) findViewById(R.id.tabs);
    mViewPager = (ViewPager) findViewById(R.id.pager);
    mViewPager.setAdapter(new ViewPagerSwipeableExamplePagerAdapter(getSupportFragmentManager()));
    mTabLayout.setupWithViewPager(mViewPager);
    if (savedInstanceState == null) {
        getSupportFragmentManager().beginTransaction().add(new ExampleDataProviderFragment(), FRAGMENT_TAG_DATA_PROVIDER_1).add(new ExampleDataProviderFragment(), FRAGMENT_TAG_DATA_PROVIDER_2).commit();
    }
}
Also used : ExampleDataProviderFragment(com.h6ah4i.android.example.advrecyclerview.common.fragment.ExampleDataProviderFragment)

Aggregations

ExampleDataProviderFragment (com.h6ah4i.android.example.advrecyclerview.common.fragment.ExampleDataProviderFragment)1