mirror of
https://github.com/material-components/material-components-android.git
synced 2026-01-20 20:12:52 +08:00
In single line mode, we implement the expanded title alignment by calculating the expected x-coordinate of expanded title and translate the canvas so the title will be aligned. However, when maxLines > 1, the static layout will always occupy the full available width, therefore the text alignment need to be done by the static layout instead. Provides text alignment other than NORMAL when it's in multi-line mode to solve the issue. Resolves https://github.com/material-components/material-components-android/issues/1276 PiperOrigin-RevId: 408895140