Skip to content

Commit

Permalink
[TextInputLayout] text field should comply with system level bold
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 413194807
  • Loading branch information
veganafro authored and josefigueroa168 committed Nov 30, 2021
1 parent 53ddac4 commit e8bde75
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -26,6 +26,7 @@
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Configuration;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.PorterDuff;
Expand Down Expand Up @@ -4142,6 +4143,12 @@ public void draw(@NonNull Canvas canvas) {
drawBoxUnderline(canvas);
}

@Override
protected void onConfigurationChanged(@NonNull Configuration newConfig) {
super.onConfigurationChanged(newConfig);
collapsingTextHelper.maybeUpdateFontWeightAdjustment(newConfig);
}

private void drawHint(@NonNull Canvas canvas) {
if (hintEnabled) {
collapsingTextHelper.draw(canvas);
Expand Down

0 comments on commit e8bde75

Please sign in to comment.