Snackbar is attached to the layout but is shown at the top of the screen
I try show snackbar on the top of my layout , but snackbar always appears at the top of the screen. How I can place the snackbar at the top of the container ? Container located in the middle of the screen
fun View.showToast(snackBarProvider: SnackBarProvider, actionDuration: Int = 5000): Snackbar {
...
return Snackbar.make(this, msg, duration).apply {
action?.let { event ->
setAction(actionText ?: "OK") { event.invoke() }.setDuration(actionDuration)
}
}
}
override fun...