Last active
July 28, 2018 04:48
-
-
Save shuanghua/9a4d4cc3f5b3d046421d90a3b9d2ea9c to your computer and use it in GitHub Desktop.
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
方式1: | |
var resourceId = resources.getIdentifier("status_bar_height", "dimen", "android") | |
//修改高度 | |
return resources.getDimensionPixelSize(resourceId) | |
方式2: | |
myView.setOnApplyWindwoInsetListener{view,insets -> | |
val statusBarSize = insets.systemWindowInsetTop | |
return insets | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment