Skip to content

Commit

Permalink
[Tabs] Fix selected text appearance not being applied correctly.
Browse files Browse the repository at this point in the history
Fixes #4161

PiperOrigin-RevId: 631847488
  • Loading branch information
leticiarossi authored and dsn5ft committed May 9, 2024
1 parent 7c9f372 commit 500dae8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/java/com/google/android/material/tabs/TabLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -2721,6 +2721,9 @@ public void onMeasure(final int origWidthMeasureSpec, final int origHeightMeasur
// We need to switch the text size based on whether the text is spanning 2 lines or not
if (textView != null) {
float textSize = tabTextSize;
if (isSelected() && selectedTabTextAppearance != -1) {
textSize = selectedTabTextSize;
}
int maxLines = defaultMaxLines;

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

0 comments on commit 500dae8

Please sign in to comment.