Grigorii Yurkov

    Grigorii Yurkov

    1 year ago
    I am trying to make toolbar without menu icon.
    @Preview
    @Composable
    fun MyToolbar() {
        Text(
            text = "My Toolbar",
            fontWeight = FontWeight.Bold,
            fontSize = 20.sp,
            modifier = Modifier.background(MaterialTheme.colors.primary).height(56.dp).fillMaxWidth(),
            textAlign = TextAlign.Left,
            color = Color.White
        )
    }
    I decided to use
    Text
    , but it doesn't want to align left
    Adam Powell

    Adam Powell

    1 year ago
    Add
    .wrapContentWidth(Alignment.Start)
    to the end of your modifiers