question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Tab Layout] Tab text not showing

See original GitHub issue

Description: The tab text for the active tab is not showing Screenshot_1579289949

Expected behavior: Tab text should not be hidden. This is the result on 1.1.0-rc01. No change has been made apart from material version Screenshot_1579289949

Android API version: 28

Material Library version: 1.2.0-alpha01 and above

Device: Nexus 5X emulator with 22, 25, 29

I’m using a LayoutMediator to set the text. I tried to see if the text was not getting set. Here’s what the layout inspector gave: Screen Shot 2020-01-17 at 1 31 58 PM and the textview properties: Screen Shot 2020-01-17 at 1 32 08 PM

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ericR-123commented, Oct 10, 2020

Simply creating a new Tab Layout template-activity in Android Studio produces this bug for me.

1reaction
shah-nishantcommented, Aug 31, 2020

We are also facing the same issue with TabLayoutMediator Screenshot 2020-09-01 at 2 35 38 AM Screenshot 2020-09-01 at 2 35 54 AM

Read more comments on GitHub >

github_iconTop Results From Across the Web

TabLayout tabs text not displaying - Stack Overflow
The problem is you're calling setupWithViewPager() after setting up your tabs with the addTab() calls, effectively overwriting them.
Read more >
Java Examples & Tutorials of TabLayout$Tab.setText (com ...
Tab onCreateTab(TabLayout tabLayout, PagerAdapter adapter, int position) { // NOTE: should not call super method here! TabLayout.Tab tab = tabLayout.
Read more >
Tabs - Material Design
Tabs have a container and each tab item has an optional icon and text label. Tab items can be in an active or...
Read more >
All-in-One — Android TabLayout and TabItem | by Myrick Chow
For configuring the height of tab indicator. The default height is 2dp . Do not use app:tabIndicatorHeight to change the height of indicator...
Read more >
Google Play Style Tabs using TabLayout - CodePath Cliffnotes
In certain cases, instead of the default tab view we may want to apply a custom XML layout for each tab. To achieve...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found