Skip to content

Commit 500dae8

Browse files
leticiarossidsn5ft
authored andcommitted
[Tabs] Fix selected text appearance not being applied correctly.
Fixes #4161 PiperOrigin-RevId: 631847488
1 parent 7c9f372 commit 500dae8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/java/com/google/android/material/tabs/TabLayout.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2721,6 +2721,9 @@ public void onMeasure(final int origWidthMeasureSpec, final int origHeightMeasur
27212721
// We need to switch the text size based on whether the text is spanning 2 lines or not
27222722
if (textView != null) {
27232723
float textSize = tabTextSize;
2724+
if (isSelected() && selectedTabTextAppearance != -1) {
2725+
textSize = selectedTabTextSize;
2726+
}
27242727
int maxLines = defaultMaxLines;
27252728

27262729
if (iconView != null && iconView.getVisibility() == VISIBLE) {

0 commit comments

Comments
 (0)