mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
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:
@@ -219,6 +219,7 @@ public class DeviceProfile {
|
||||
// Whether Taskbar will inset the bottom of apps by taskbarSize.
|
||||
public boolean isTaskbarPresentInApps;
|
||||
public int taskbarSize;
|
||||
public int stashedTaskbarSize;
|
||||
|
||||
// DragController
|
||||
public int flingToDeleteThresholdVelocity;
|
||||
@@ -256,12 +257,7 @@ public class DeviceProfile {
|
||||
widthPx = windowBounds.bounds.width();
|
||||
heightPx = windowBounds.bounds.height();
|
||||
availableWidthPx = windowBounds.availableSize.x;
|
||||
int taskbarInset = isTaskbarPresent
|
||||
? ResourceUtils.getNavbarSize(
|
||||
isLandscape ? "navigation_bar_height_landscape" : "navigation_bar_height",
|
||||
res)
|
||||
: 0;
|
||||
availableHeightPx = windowBounds.availableSize.y - taskbarInset;
|
||||
availableHeightPx = windowBounds.availableSize.y;
|
||||
|
||||
aspectRatio = ((float) Math.max(widthPx, heightPx)) / Math.min(widthPx, heightPx);
|
||||
boolean isTallDevice = Float.compare(aspectRatio, TALL_DEVICE_ASPECT_RATIO_THRESHOLD) >= 0;
|
||||
@@ -283,6 +279,7 @@ public class DeviceProfile {
|
||||
|
||||
if (isTaskbarPresent) {
|
||||
taskbarSize = res.getDimensionPixelSize(R.dimen.taskbar_size);
|
||||
stashedTaskbarSize = res.getDimensionPixelSize(R.dimen.taskbar_stashed_size);
|
||||
}
|
||||
|
||||
edgeMarginPx = res.getDimensionPixelSize(R.dimen.dynamic_grid_edge_margin);
|
||||
|
||||
Reference in New Issue
Block a user