增加了系统状态栏透明功能
TODO UI需要部分适配下

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-03-29 21:27:24 +08:00
committed by pangfan
parent f28fa33394
commit 1c0ea65926
12 changed files with 107 additions and 144 deletions

View File

@@ -513,7 +513,9 @@ public final class BarUtils {
* @param isVisible True to set navigation bar visible, false otherwise.
*/
public static void setNavBarVisibility(@NonNull final Activity activity, boolean isVisible) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) return;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
return;
}
setNavBarVisibility(activity.getWindow(), isVisible);
}
@@ -525,7 +527,9 @@ public final class BarUtils {
* @param isVisible True to set navigation bar visible, false otherwise.
*/
public static void setNavBarVisibility(@NonNull final Window window, boolean isVisible) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) return;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
return;
}
final ViewGroup decorView = (ViewGroup) window.getDecorView();
for (int i = 0, count = decorView.getChildCount(); i < count; i++) {
final View child = decorView.getChildAt(i);