Search in sources :

Example 1 with PagerSlidingTabStrip

use of com.astuetz.PagerSlidingTabStrip in project Navigation-drawer-page-sliding-tab-strip by balaji-k13.

the class PageSlidingTabStripFragment method onViewCreated.

@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    PagerSlidingTabStrip tabs = (PagerSlidingTabStrip) view.findViewById(R.id.tabs);
    ViewPager pager = (ViewPager) view.findViewById(R.id.pager);
    MyPagerAdapter adapter = new MyPagerAdapter(getChildFragmentManager());
    pager.setAdapter(adapter);
    tabs.setViewPager(pager);
}
Also used : PagerSlidingTabStrip(com.astuetz.PagerSlidingTabStrip) ViewPager(android.support.v4.view.ViewPager)

Example 2 with PagerSlidingTabStrip

use of com.astuetz.PagerSlidingTabStrip in project android-shape-imageview by siyamed.

the class SampleActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_sample);
    getSupportActionBar().hide();
    ViewPager pager = (ViewPager) findViewById(R.id.pager);
    pager.setAdapter(new PagerAdapter(getSupportFragmentManager()));
    PagerSlidingTabStrip tabStrip = (PagerSlidingTabStrip) findViewById(R.id.tabs);
    tabStrip.setViewPager(pager);
}
Also used : PagerSlidingTabStrip(com.astuetz.PagerSlidingTabStrip) ViewPager(android.support.v4.view.ViewPager) FragmentPagerAdapter(android.support.v4.app.FragmentPagerAdapter)

Aggregations

ViewPager (android.support.v4.view.ViewPager)2 PagerSlidingTabStrip (com.astuetz.PagerSlidingTabStrip)2 FragmentPagerAdapter (android.support.v4.app.FragmentPagerAdapter)1