[Tab Layout] Tab text not showing
See original GitHub issueDescription: The tab text for the active tab is not showing
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
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:
and the textview
properties:
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:11 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Simply creating a new Tab Layout template-activity in Android Studio produces this bug for me.
We are also facing the same issue with TabLayoutMediator