0

I have an activity with a tablayout menu with icons and a viewpager in it. If I use the Fragment Activity then my Icons disappear and I only get Strings back instead of the icons.

Unfortunately the public CharSequence getPageTitle(int position) method can't be modified to something like public int getPageTitle(int position).

Does a FragmentAdapter exist which gives back icons instead of strings or how can I modify the "getPageTitle" method to get back Icons?

I found a similiar question to my problem, but its still unanswered: Page Icon does not appear, only the page title - android

Ramón Wilhelm
  • 967
  • 2
  • 18
  • 39

1 Answers1

0

I found an easier way to use a FragmentPager with a TabLayout without missing Icons:

Design support library tabs with only icons

Ramón Wilhelm
  • 967
  • 2
  • 18
  • 39