Hey all, how can I add space between inside of the...
# compose
b
Hey all, how can I add space between inside of the topAppBar? Should look like the figma
s
You could add a
Spacer(modifier = Modifier.weight(1f))
in between both icons
b
ty
c
Top bar has support for a navIcon which would show the left icon, and then for actions, which would show on the right. no need for a spacer
b
Any way to get rid of the top elevation?
c
elevation = 0.dp?
You can’t easily only get rid of only top elevation
b
That gets rid of the top and bottom. I only want the top one
oh
You guys see something wrong I did here?
c
Customizing shadow/elevation is non-trivial
Please provide the error(s)
b
s
I would guess the autcompletion selected one of the other overloads for the TopAppBar, try to remove the outside lambda at the end of your function
c
You may also be missing the title parameter
b
I need a title parameter even if I only want to show 2 icons?
c
At the moment yes as that’s the expected method signature. But you can just set title to
{ }
(empty Composable)
b
thanks everyone it works, it was the title parameter