From 241293aaee976172406bd6a35b6abc068acf353a Mon Sep 17 00:00:00 2001 From: Brandon Dayauon Date: Thu, 7 Apr 2022 19:57:04 -0700 Subject: [PATCH] Fixed overlap issue where toggle button gets overlapped by 3 button nav bar..now button shifts up so it's not totally obscured Test: Manual - On Raven Before: https://screenshot.googleplex.com/sYq2i7YGjqmMjXe After: https://screenshot.googleplex.com/9WRtgisGChisbFj Bug: 223996104 Change-Id: Ic302e26b2fb6db9a9e06b335c753266e92b6c671 --- src/com/android/launcher3/allapps/WorkProfileManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/allapps/WorkProfileManager.java b/src/com/android/launcher3/allapps/WorkProfileManager.java index bcb0d14770..6203cead2d 100644 --- a/src/com/android/launcher3/allapps/WorkProfileManager.java +++ b/src/com/android/launcher3/allapps/WorkProfileManager.java @@ -27,6 +27,7 @@ import android.os.UserHandle; import android.os.UserManager; import android.util.Log; import android.view.ViewGroup; +import android.view.WindowInsets; import androidx.annotation.IntDef; import androidx.annotation.Nullable; @@ -147,6 +148,9 @@ public class WorkProfileManager implements PersonalWorkSlidingTabStrip.OnActiveP workFabMarginBottom += mWorkModeSwitch.getResources().getDimensionPixelSize(R.dimen.qsb_widget_height); } + if (!mAllApps.mActivityContext.getDeviceProfile().isGestureMode){ + workFabMarginBottom += mAllApps.mActivityContext.getDeviceProfile().getInsets().bottom; + } ((ViewGroup.MarginLayoutParams) mWorkModeSwitch.getLayoutParams()).bottomMargin = workFabMarginBottom; if (mWorkModeSwitch.getParent() != mAllApps) { @@ -158,7 +162,6 @@ public class WorkProfileManager implements PersonalWorkSlidingTabStrip.OnActiveP mWorkModeSwitch.updateCurrentState(mCurrentState == STATE_ENABLED); return true; } - /** * Removes work profile toggle button from {@link BaseAllAppsContainerView} */