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

mattinger

02/09/2022, 1:54 PM
Does anyone know if there’s a more general equivalent of the snackbar for arbitrary banner content? Aside from the issue of it not being very flexible (even through SnackbarData is an interface, there’s no way to provide a different implementation to give to the SnackbarHost). There’s also the positioning on screen as well, which i need to be at the top and not the bottom.
a

Albert Chang

02/10/2022, 2:41 AM
You can just place the
SnackbarHost
at the top of the screen.
m

mattinger

02/18/2022, 4:25 PM
@Albert Chang This doesn’t solve the problem of it being a closed data type. I mean SnackbarData is an interface, but the innards of it are pretty closed, and there’s no way to pass of a different type of stuctured data to the Snackbar to use in rendering it’s view.
a

Albert Chang

02/18/2022, 7:02 PM
What exactly do you want? There is even an overload of
Snackbar
that accept a composable so you can put anything into it.
3 Views