Closed amitav13 closed 6 years ago
Update:
I've just tried this with the TickerView
sitting in a plain old View
class, to rule out any CoordinatorLayout
issues. TickerView#setTextSize
does not seem to recalculate character spacing in this scenario either.
Sorry for the late reply. I am able to repro the issue on the sample app, will investigate a fix.
Awesome, thanks. Is there a release planned for the near future?
Hi, I've got a
TickerView
sitting inside aCoordinatorLayout
. I'm making the text size smaller as the screen is scrolled up, using aCoordinatorLayout.Behavior
andRecyclerView.OnScrollListener()
. While the text size shrinks correctly, the character spacing doesn't seem to update. To illustrate:becomes
Approaches that I've tried so far without success:
Increasing right padding: If I set the right padding with the view width set to
wrap_content
, the view size increases. If I set it to a fixed width, the right edge of the view gets cropped.setAnimateMeasurementChange(true)
: Seems to have no effect.balance.setText(text)
: Retrieving and setting the same text on the view in hopes of triggering a remeasuring of the character widths.Calling
balance.requestLayout()
manually on every update, and a variety of permutations of using this combined with the other approaches above.Is there another approach that you could suggest? Thanks!