Don't apply nav bar insets in tablets
- With flexible inset changes in T, taskbar is no longer inseted in getCurrentSizeRange, i.e. DeviceProfile.availableHeight no longer inset nav bar size - In order for home screen sizes to be calcualted correctly, avoid inseting nav bar in LauncherRootView - Only apply a bottom padding with stashed taskbar size to necessarily surfaces (Overview) - Home screen icon overlap will be fixed in separate CL Bug: 215528237 Test: maual in tablet gesture nav and 3 buttons Change-Id: I9bc796ba059159e819f8cd121ddabab96c8113d2
This commit is contained in:
@@ -27,10 +27,8 @@ import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.annotation.Nullable;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.view.ViewConfiguration;
|
||||
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.util.MultiValueAlpha.AlphaProperty;
|
||||
import com.android.quickstep.AnimatedFloat;
|
||||
@@ -146,10 +144,9 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
|
||||
public TaskbarStashController(TaskbarActivityContext activity) {
|
||||
mActivity = activity;
|
||||
mPrefs = Utilities.getPrefs(mActivity);
|
||||
final Resources resources = mActivity.getResources();
|
||||
mStashedHeight = resources.getDimensionPixelSize(R.dimen.taskbar_stashed_size);
|
||||
mSystemUiProxy = SystemUiProxy.INSTANCE.get(activity);
|
||||
mUnstashedHeight = mActivity.getDeviceProfile().taskbarSize;
|
||||
mStashedHeight = mActivity.getDeviceProfile().stashedTaskbarSize;
|
||||
}
|
||||
|
||||
public void init(TaskbarControllers controllers, TaskbarSharedState sharedState) {
|
||||
|
||||
@@ -214,12 +214,13 @@ public class OverviewActionsView<T extends OverlayUICallbacks> extends FrameLayo
|
||||
setPadding(mInsets.left, 0, mInsets.right + additionalPadding, 0);
|
||||
}
|
||||
|
||||
// Align vertically, using taskbar height + mDp.taskbarOffsetY() to guestimate
|
||||
// where the button nav top is
|
||||
// Align vertically, using taskbar height + mDp.taskbarOffsetY() to estimate where
|
||||
// the button nav top is.
|
||||
View startActionView = findViewById(R.id.action_screenshot);
|
||||
int marginBottom = getOverviewActionsBottomMarginPx(
|
||||
SysUINavigationMode.getMode(getContext()), mDp);
|
||||
int actionsTop = (mDp.heightPx - marginBottom - mInsets.bottom);
|
||||
int actionsTop =
|
||||
(mDp.heightPx - marginBottom - mInsets.bottom) - startActionView.getHeight();
|
||||
int navTop = mDp.heightPx - (mDp.taskbarSize + mDp.getTaskbarOffsetY());
|
||||
int transY = navTop - actionsTop
|
||||
+ ((mDp.taskbarSize - startActionView.getHeight()) / 2);
|
||||
@@ -296,10 +297,13 @@ public class OverviewActionsView<T extends OverlayUICallbacks> extends FrameLayo
|
||||
return inset;
|
||||
}
|
||||
|
||||
// Actions button will be aligned with nav buttons in updatePaddingAndTranslations().
|
||||
if (mode == SysUINavigationMode.Mode.THREE_BUTTONS) {
|
||||
return dp.overviewActionsMarginThreeButtonPx + inset;
|
||||
}
|
||||
|
||||
return dp.overviewActionsBottomMarginGesturePx + inset;
|
||||
// There is no bottom inset when taskbar is present, use stashed taskbar as padding instead.
|
||||
return dp.overviewActionsBottomMarginGesturePx
|
||||
+ (dp.isTaskbarPresent ? dp.stashedTaskbarSize : inset);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user