Roar Gronmo

    Roar Gronmo

    2 years ago
    Simple, but still problematic. Before we had
    crossAxisAlignment
    (and
    mainAxisAlignment
    ) which we could sett to
    CrossAxisAlignement.End
    ( or
    MainAxisAlignment.End
    ) I want to align thos two texts below to the right, how is that done in dev03 ?
    Column(modifier = Spacing(right = 4.dp) )
    {
        Surface(color = Color.Blue) {
            Text(text = "2019.12.09 12:00")
        }
        Surface(color = Color.Red) {
            
            Text(text = "14d 16h 00min")
        }
    }
    matvei

    matvei

    2 years ago
    in dev03 the recommended way to set many layout behaviors is to use modifiers
    Surface(color = Color.Blue, modifier = Gravity.End) {
            Text(text = "2019.12.09 12:00")
        }
    This should do the trick
    Roar Gronmo

    Roar Gronmo

    2 years ago
    l

    Louis Pullen-Freilich [G]

    2 years ago
    Yeah, it's a separate object: https://developer.android.com/reference/kotlin/androidx/ui/layout/Gravity.html Although we should probably link to it from the Row / Column docs