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:
Ivan Iskandar
2022-12-10 22:01:16 +07:00
committed by GitHub
parent 7cbe18d325
commit 820ed6a468
3 changed files with 43 additions and 32 deletions
@@ -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)
}