AutoSize TextView - major fixes
* splits the auto-size setup part from the execution function: ** in TextView CTOR we only setup and we leave the actual auto-sizing execution to happen in the view||text layout phase ** encapsulated the conditions needed to start applying auto-size in the execution function * introduces a private way to set the text size without requesting a new layout pass; auto-size always uses this practically setting the text size on the paint object and creating a new layout * calls execution autoSizeText() from within TextView#checkForRelayout() if not requestLayout() is needed => this makes sure that auto-size will be performed even if a view layout is not requested, but only a text layout * fixes the calculation of the sizes available for auto-size when configured via granularity Bug: 62050646 Bug: 38409622 Bug: 38440435 Bug: 62109627 Test: run cts --test android.widget.cts.TextViewTest -m \ CtsWidgetTestCases Test: manually tested the new behaviors in demo apps Test: new test attached in topic Change-Id: I4ccaa0a0afa3b5aa47213442d0029da2c74e7eb4
Loading
Please register or sign in to comment