mirror of
https://github.com/material-components/material-components-android.git
synced 2026-01-17 10:21:51 +08:00
When a ProgressIndicator doesn't have a preferred width or height, its size will be calculated incorrectly as we rely on its super class, ProgressBar's onMeasure() method to decide its size. But ProgressBar doesn't support "unspecified" preferred width/height, in this case it will set measured dimensions to fixed values based on the incorrect "preferred size". Fixes this issue by fallback to the default View.onMeasure() logic when no preferred width or height is specified. Resolves https://github.com/material-components/material-components-android/issues/2163 PiperOrigin-RevId: 452795304