mirror of
https://github.com/material-components/material-components-android.git
synced 2026-01-18 19:11:39 +08:00
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