conradchen 19d05000bc [Button] Fix icon position with multiline text
When the icon gravity is textTop, we are using the smaller one of the calculated height from text paint and the text layout height to decide the icon position. This is wrong when there are multiple lines of text since the text paint is always single line and always shorter than the actual height.

Fixes this by returning the actual layout height whenever there are multiple lines of text to fix the issue.

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

PiperOrigin-RevId: 440923733
2022-04-11 15:12:33 -04:00
..