Hi ! First I'm apologizing if I post in the wrong ...
# multiplatform
l
Hi ! First I'm apologizing if I post in the wrong channel : I did not remember if TopAppBar is exclusive to multiplatform. Why the following code does not show up an icon at the right of the top bar ?
Copy code
TopAppBar(contentPadding = PaddingValues(8.dp)) {
        Text("Zip experiment")
        Spacer(modifier = Modifier.fillMaxWidth())
        IconButton(onClick = onAddItemCallback) {
            Icon(modifier = Modifier.size(20.dp), imageVector = Icons.Default.AddCircle, contentDescription = stringResource(Res.string.add_item))
        }
    }
1
Oups sorry : fillMaxWidth() (in the spacer modifier) is guilty here ! Just replaced with Modifier.weight(1f)
c
Also for compose related question the is the general #compose channel.
👆 1
l
Sorry, as I said above, I was not sure that TopAppBar was related to Compose or to only Compose MP