'Compose: "Ellipsize" row items if they exceed width

I want to layout items in a row with a maximum width. If the items exceed this width a "overflow" composable should be displayed at the end. (Similar to ellipsizing text)

maxWidth: Int

I guess I'd need a custom Row layout that takes in a "overflow" composable and displays that if the items exceed the width. Or is there a simpler way to achieve that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source