use of com.lapism.searchview.sample.view.FragmentAdapter in project SearchView by lapism.
the class BaseActivity method setViewPager.
protected void setViewPager() {
FragmentAdapter adapter = new FragmentAdapter(getSupportFragmentManager());
adapter.addFragment(new SearchFragment(), getString(R.string.installed));
adapter.addFragment(new SearchFragment(), getString(R.string.all));
ViewPager viewPager = (ViewPager) findViewById(R.id.viewPager);
viewPager.setAdapter(adapter);
TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs);
tabLayout.setupWithViewPager(viewPager);
}
Aggregations