How to fix the Snackbar height and position?

后端 未结 7 1117
甜味超标
甜味超标 2021-02-08 03:16

On Android Support Library 24.1.1, the Snackbar was working fine:

Then starting on Android Support Library 24.2.0 onwards, the

7条回答
  •  再見小時候
    2021-02-08 03:54

    It's 2020 and also I don't know if it's related but I got my snackbar having some padding at the bottom when using android 10 gesture navigation. None of the above works for my case. I finally got it fixed with a super simple line:

    val snackbar = Snackbar.make(view, message, duration)
    snackbar.isGestureInsetBottomIgnored = true // here
    snackbar.show()
    

    Hope it helps.

提交回复
热议问题