I would like to calculate the navigationBar height. I've seen this presentation : https://chris.banes.me/talks/2017/becoming-a-master-window-fitter-nyc/
So, I tried to use the method View.setOnApplyWindowInsetsListener().
But, for some reason, it's never called.
Does anyone knows why ? Any limitation there ?
I've tried to use it like this :
navBarOverlay.setOnApplyWindowInsetsListener { v, insets ->
Timber.i("BOTTOM = ${insets.systemWindowInsetBottom}")
return@setOnApplyWindowInsetsListener insets
}
Note that my root layout is a ConstraintLayout.