mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Use less icons in hotseat when in 3 button nav for tablet
- We have less space on tablets when 3 button nav is enabled because QSB is now inline with the icons. This creates a new attribute to define how many icons should be shown when in that mode. This could be used for other grids in the future as well. - InvariantDeviceProfile now listens for nav mode changes Fixes 214882090, 221420204 Test: manual Change-Id: I012432a1a322c4e5505e46a1198c841ab124aaa6
This commit is contained in:
@@ -26,6 +26,7 @@ import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCH
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_NAVIGATION_MODE_GESTURE_BUTTON;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.launcher3.util.PackageManagerHelper.getPackageFilter;
|
||||
import static com.android.launcher3.util.WindowManagerCompat.MIN_LARGE_TABLET_WIDTH;
|
||||
import static com.android.launcher3.util.WindowManagerCompat.MIN_TABLET_WIDTH;
|
||||
|
||||
import static java.util.Collections.emptyMap;
|
||||
@@ -369,12 +370,20 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the bounds represent a tablet
|
||||
* Returns {@code true} if the bounds represent a tablet.
|
||||
*/
|
||||
public boolean isTablet(WindowBounds bounds) {
|
||||
return dpiFromPx(Math.min(bounds.bounds.width(), bounds.bounds.height()),
|
||||
densityDpi) >= MIN_TABLET_WIDTH;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns {@code true} if the bounds represent a large tablet.
|
||||
*/
|
||||
public boolean isLargeTablet(WindowBounds bounds) {
|
||||
return dpiFromPx(Math.min(bounds.bounds.width(), bounds.bounds.height()),
|
||||
densityDpi) >= MIN_LARGE_TABLET_WIDTH;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user