Following code will get a warning:
Using internal inset dimension resource `status_bar_height` is not supported
val statusBarHeight: Int
get() {
var result = 0
val resourceId = resources.getIdentifier("status_bar_height", "dimen", "android")
if (resourceId > 0) {
result = resources.getDimensionPixelSize(resourceId)
}
retur result
}
Is there a public API to get it (not from activity)?