Skip to content

Commit

Permalink
[BottomNavigationView][NavigationRailView] Updated active text label …
Browse files Browse the repository at this point in the history
…to use a bold typeface.

PiperOrigin-RevId: 476415508
  • Loading branch information
paulfthomas authored and pekingme committed Sep 26, 2022
1 parent 8dcdd26 commit 11e98f2
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -26,6 +26,7 @@
import android.animation.ValueAnimator.AnimatorUpdateListener;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.RippleDrawable;
Expand Down Expand Up @@ -636,6 +637,8 @@ public void setTextAppearanceInactive(@StyleRes int inactiveTextAppearance) {
public void setTextAppearanceActive(@StyleRes int activeTextAppearance) {
setTextAppearanceWithoutFontScaling(largeLabel, activeTextAppearance);
calculateTextScaleFactors(smallLabel.getTextSize(), largeLabel.getTextSize());
// TODO(b/246765947): Use component tokens to control font weight
largeLabel.setTypeface(largeLabel.getTypeface(), Typeface.BOLD);
}

/**
Expand Down

0 comments on commit 11e98f2

Please sign in to comment.