Move system bar color set to the main composable (#8710)
This one doesn't check navbar location before adding a scrim, doesn't really matter since now no body component is being drawn below the system bar.
This commit is contained in:
@@ -374,3 +374,11 @@ fun Context.getApplicationIcon(pkgName: String): Drawable? {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets system's config_navBarNeedsScrim boolean flag added in Android 10, defaults to true.
|
||||
*/
|
||||
fun Context.isNavigationBarNeedsScrim(): Boolean {
|
||||
return Build.VERSION.SDK_INT < Build.VERSION_CODES.Q ||
|
||||
InternalResourceHelper.getBoolean(this, "config_navBarNeedsScrim", true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user