Created
June 2, 2018 14:39
-
-
Save nontravis/6556aff0460d9cfd599a40b8e4e72510 to your computer and use it in GitHub Desktop.
get_statusbar_height.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var statusBarHeight: Int = 0 | |
ViewCompat.setOnApplyWindowInsetsListener(rootView) { view, windowInsets -> | |
statusBarHeight = windowInsets.systemWindowInsetTop | |
return windowInsets //pass insets down to child view | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment