0

I am using the Google Design Library v22.2.0. I have used the TabLayout with ViewPager using custom view for tabs.

After getting location, I have to update the Title of custom tab view. This was the 1st option I tried to update it:

tabLayout.getTabAt(position).setText("Location");

But this removes the Custom View & sets normal Text.

I looked at the references of TabLayout.Tab here & found that there's a function named public View getCustomView().

Tried the same thing in Studio & it says that the function is not public.

Does anybody else is facing the same issue. If yes, where should I report this ?

Tejas
  • 585
  • 3
  • 15

2 Answers2

1

I think it is a bug on Android design support library, check here

Just change this line in gradle

compile 'com.android.support:design:23.0.0'

and make sure compile and target sdk set to 23.

Community
  • 1
  • 1
juanhl
  • 1,170
  • 2
  • 11
  • 16
1

It's not a bug. It's added later after releasing the library in this commit you just need to update the version of the library to the recent one. It has been public from version 23.0.0.

Ahmed Hegazy
  • 12,395
  • 5
  • 41
  • 64