I have a full screen activity in my application. I want my page title to be positioned under status bar. How can I measure status bar height in a full screen activity?
I researched about it and tried them. One of them is this, which is using an attribute in xml that doen't work in my case. The other one is Second Solution
val rectangle = Rect()
window.decorView.getWindowVisibleDisplayFrame(rectangle)
val statusBarHeight = rectangle.top
statusBarHeight
is 0, because it's a full screen activity probably. Any help to position my some elements like title below status bar staff?