0

I have used viewPager with PagerTabStrip, which is working fine. But i want to use custom layout for each Tab.

For now, it takes Tab string data from tabtiles[] array which is passed through the getPageTitles() callback. So, instead of passing a CharSequence, is it possible to pass a view of the custom layout defined for the tab.

private String tabtitles[] = new String[] { "Tab1", "Tab2", "Tab3" };

@Override
    public CharSequence getPageTitle(int position) {
        return tabtitles[position];
    }

I was also wondering to use adapter for the tab data, as my tabs list is going to grow and the layout is going to be same.

Any kind of suggestions would be appreciated.

Ritt
  • 3,181
  • 3
  • 22
  • 51

0 Answers0