Merge "Fix work toggle button to be placed where it should be." into tm-qpr-dev

This commit is contained in:
Brandon Dayauon
2022-06-15 22:05:49 +00:00
committed by Android (Google) Code Review
@@ -158,10 +158,10 @@ public class WorkProfileManager implements PersonalWorkSlidingTabStrip.OnActiveP
workFabMarginBottom += mAllApps.mActivityContext.getDeviceProfile().getInsets().bottom;
}
lp.bottomMargin = workFabMarginBottom;
int totalScreenWidth = mDeviceProfile.widthPx;
int allAppsContainerWidth = mAllApps.getVisibleContainerView().getWidth();
int personalWorkTabWidth =
mAllApps.mActivityContext.getAppsView().getFloatingHeaderView().getTabWidth();
lp.rightMargin = lp.leftMargin = (totalScreenWidth - personalWorkTabWidth) / 2;
lp.rightMargin = lp.leftMargin = (allAppsContainerWidth - personalWorkTabWidth) / 2;
if (mWorkModeSwitch.getParent() != mAllApps) {
mAllApps.addView(mWorkModeSwitch);
}