https://kotlinlang.org logo
#compose
Title
# compose
j

jannis

12/06/2021, 3:47 PM
Any idea how to show a vertical
LinearProgressIndicator
, meaning full height, small width, animating from top to bottom? I tried to simply rotating it by 90°, which surprisingly worked somehow, e.g.:
Copy code
Modifier
    .height(8.dp)
    .fillMaxWidth()
    .graphicsLayer {
        rotationZ = 90f
        transformOrigin = TransformOrigin(0f, 0f)
    }
But it seems limited to the width of the Composable, hence not filling the whole height. Any other suggestions 😅 ?
m

mcpiroman

12/06/2021, 5:38 PM
Maybe if you do width(8.dp).fillMaxHeight() or move these modifiers after graphicsLayer? 🤔
j

jannis

12/07/2021, 8:45 AM
Sadly that doesn't work
Using width/fillmaxheight gives me a horizontal bar which animates vertically 😅 Changing the order has no effect in this case
In the end I just copied the Sources and made it vertical. Took me 5 minutes and works like a charm.
3 Views