Skip to content

Commit

Permalink
[CollapsingToolbarLayout] Fixed multiline RTL collapsed title text po…
Browse files Browse the repository at this point in the history
…sition

PiperOrigin-RevId: 382073266
  • Loading branch information
dsn5ft authored and hunterstich committed Jul 1, 2021
1 parent 3a76417 commit 6f28838
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -767,8 +767,8 @@ public void draw(@NonNull Canvas canvas) {
final int saveCount = canvas.save();
// Compute where to draw textLayout for this frame
if (textToDraw != null && drawTitle) {
final float currentExpandedX =
currentDrawX + textLayout.getLineLeft(0) - expandedFirstLineDrawX * 2;
float firstLineX = maxLines > 1 ? textLayout.getLineStart(0) : textLayout.getLineLeft(0);
final float currentExpandedX = currentDrawX + firstLineX - expandedFirstLineDrawX * 2;

textPaint.setTextSize(currentTextSize);
float x = currentDrawX;
Expand Down

0 comments on commit 6f28838

Please sign in to comment.