conradchen b6b895a1e4 [Button] Fix icon textStart/End alignment with multiline text
When calculating text width to decide the icon position with textStart/End alignment, we missed accounting for multiline text. Fixes this by calculating each line's width separately and take the widest one to decide the icon position.

Resolves https://github.com/material-components/material-components-android/issues/2007

PiperOrigin-RevId: 440982189
2022-04-11 17:13:57 -04:00
..