优化
This commit is contained in:
1 parent
238ba9cbe6
commit
7f9fefb17c
1 file changed
+2
-2
@@ -186,7 +186,7 @@ val Context.sysScreenOffTime: Int
|
||||
}
|
||||
|
||||
val Context.statusBarHeight: Int
|
||||
@SuppressLint("DiscouragedApi")
|
||||
@SuppressLint("DiscouragedApi", "InternalInsetResource")
|
||||
get() {
|
||||
if (Build.BOARD == "windows") {
|
||||
return 0
|
||||
@@ -196,7 +196,7 @@ val Context.statusBarHeight: Int
|
||||
}
|
||||
|
||||
val Context.navigationBarHeight: Int
|
||||
@SuppressLint("DiscouragedApi")
|
||||
@SuppressLint("DiscouragedApi", "InternalInsetResource")
|
||||
get() {
|
||||
val resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android")
|
||||
return resources.getDimensionPixelSize(resourceId)
|
||||
|
||||
Reference in new issue
Block a user