Skip to content

Conversation

@pubiqq
Copy link
Contributor

@pubiqq pubiqq commented Mar 4, 2025

Also fixes #4639.

@drchen
Copy link
Contributor

drchen commented Mar 5, 2025

Hey Hunter, will you able to review this PR?

@hunterstich hunterstich added the Reviewing Internally An internal change has been created and sent for review. label Mar 13, 2025
@pubiqq pubiqq mentioned this pull request Nov 11, 2024
@pubiqq pubiqq force-pushed the internal/adjust-letter-spacing-with-text-size-in-cth branch from 587f81f to 9fae0ca Compare May 12, 2025 20:36
@pubiqq pubiqq force-pushed the internal/adjust-letter-spacing-with-text-size-in-cth branch from 9fae0ca to 6b05f8a Compare September 3, 2025 21:14
@pubiqq
Copy link
Contributor Author

pubiqq commented Sep 8, 2025

Ping

Comment on lines -715 to -725
if (collapsedLetterSpacing != expandedLetterSpacing) {
textPaint.setLetterSpacing(
lerp(
expandedLetterSpacing,
collapsedLetterSpacing,
fraction,
AnimationUtils.FAST_OUT_SLOW_IN_INTERPOLATOR));
} else {
textPaint.setLetterSpacing(collapsedLetterSpacing);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of removing this block, could it be moved into the else statement of if (fadeModeEnabled)?

if (fadeModeEnabled) {
   ...
} else {
   lerp letter spacing
}

Comment on lines +1102 to +1106
newLetterSpacing = lerp(
expandedLetterSpacing, collapsedLetterSpacing,
1f, collapsedTextSize / expandedTextSize,
scale);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer needed if letter spacing lerping is replaced inside calculateOffsets

@hunterstich
Copy link
Contributor

Hey @pubiqq!

I checked this PR internally and it is causes some breakages with TextInputLayout's hint. With this change, when the hint text is collapsed on focus, the hint's letter spacing is smaller than it was previously.

I added some comments suggesting an alternative approach. Let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewing Internally An internal change has been created and sent for review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TopAppBar] Subtitle letters move sideways when fading

3 participants