Merge "Fix All Apps Icons Count estimation" into main

This commit is contained in:
Fengjiang Li authored and Android (Google) Code Review committed 2023-10-03 21:57:36 +00:00
commit d31f9080aa
3 files changed
+21 -10

No files matched your search

@@ -704,6 +704,17 @@ public class DeviceProfile {
return renderer;
}
/**
* Return maximum of all apps row count displayed on screen. Note that 1) Partially displayed
* row is counted as 1 row, and 2) we don't exclude the space of floating search bar. This
* method is used for calculating number of {@link BubbleTextView} we need to pre-inflate. Thus
* reasonable over estimation is fine.
*/
public int getMaxAllAppsRowCount() {
return (int) (Math.ceil((availableHeightPx - allAppsTopPadding)
/ (float) allAppsCellHeightPx));
}
/**
* QSB width is always calculated because when in 3 button nav the width doesn't follow the
* width of the hotseat.