If floating search is active in Overview (flag enabled and we are
the active Launcher), these buttons will be aligned to the search
bar relative to the bottom of the screen. Otherwise, the buttons
will be aligned below the active task like before.
Demo for Launcher3 build:
https://drive.google.com/file/d/1fVzRRnW5AFDMPkW-E8_w4BOCzTAOURQ_/view?usp=drive_link&resourcekey=0-6-EbFZXkBqcu0rw7uuEzjw
Bug: 292000892
Test: Manual with floating enabled/disabled and
SEPARATE_RECENTS_ACTIVITY enabled/disabled (simulating not being
the active Launcher). Also tested with a 3P Launcher, Nova.
Flag: N/A; this change is enabled by default, but also verified
UI looks correct with ENABLE_FLOATING_SEARCH_BAR.
Change-Id: Ia45f88d2c691c4525b1e73cca4707498d058a917
Three new attributes were created to be used in device profile. These attributes will provide the responsive specs for two panel devices.
Fix: 292204121
Flag: ENABLE_RESPONSIVE_WORKSPACE
Test: DeviceProfileDumpTest
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Change-Id: I35c93e16dde043b0fd611b81bf2de74e3621818e
Refactors AllAppsSpecs, FolderSpecs and WorkspaceSpecs initialization to use the same code to parse the xml with different map function. This CL improves the readability of the code and remove code duplication.
Fix: 286538013
Flag: ENABLE_RESPONSIVE_WORKSPACE
Test: AllAppsSpecsTes
Test: CalculatedAllAppsSpecTest
Test: CalculatedFolderSpecsTest
Test: CalculatedWorkspaceSpecTest
Test: FolderSpecsTest
Test: WorkspaceSpecsTest
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Change-Id: Iec5863619399efd2e80f3db46b75c4d785e1656f
Resize the icon so that it fits within the cell. This will stop the icon from being cut off if it is larger than the cell.
Fix: 288075868
Test: DeviceProfileAlternativeDisplaysDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I67c703d89bb7f54a457793490b8251584363dedc
The app icon size in XMLs are 10% larger because of http://b/235886078, so we need to remove that from the padding between the icon and the label.
Bug: 235886078
Fix: 279142287
Test: DeviceProfileDumpTest
Flag: N/A
Change-Id: I2662c30252dc4e06d4767dbe7125a99a02ce2b64
It uses the new responsive folder calculations and specs when responsive grid is enabled. The grid has to have folderSpecsId defined to use the new specifications, otherwise it will use the current scalable grid implementation.
Fix: 284155638
Test: DeviceProfileDumpTest
Test: ResponsiveHomeScreenFolderImageTest
Test: HomeScreenFolderImageTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I535cff4bb00e969f782447a898230fe2b2c05cc9
When the icon can't fit the cell size, decrease it by steps defined by UX until it fits or reach a minimum size.
Fix: 283929701
Test: DeviceProfileAlternativeDisplaysDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Test: IconSizeStepsTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I2875b669c0a24ecd1c4d785a33e2cffb78c9fe76
All Apps follow the same sizes as the workspace, so we copy the measurements to AllApps values.
Bug: 284152932
Test: HomeScreenAllAppsImageTest
Test: DeviceProfileDumpTest
Test: HomeScreenResponsiveAllAppsImageTest
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I12743a6ac5ab5f1a8bc911511bdc7e12b2261d86
This lets home screen align to workspace icons while All Apps
aligns with those icons. In addition, on tablets where the QSB
is inlined with the hotseat, floating search bar can also move
horizontally accordingly.
Bug: 275635606
Bug: 259619990
Test: Manual on tablet as well as foldable.
Flag: ENABLE_FLOATING_SEARCH_BAR
Change-Id: I67745c66390736cdf39d969ef7767096ae13c671
This means adding the search view to the drag layer, so it can
persist and animate across Launcher states (i.e. Home, All Apps,
Overview, Overview from App).
Some high level things:
- LauncherState now has a flag indicating if the floating
search bar should be visible, as well as a method indicating
how high it should rest when the keyboard is not showing. By
default the height is set negative if the flag is not present,
so the search bar will rest off screen in that state.
- LauncherState also has a new method indicating if the search
bar should show as a pill when not focused. Currently this is
done in phone portrait mode in all apps and overview.
- SearchUiManager now has a method for gestures to hint that
the search bar will be focused or unfocused soon, e.g. for
the app -> overview case, we hint that it will be focused
when crossing the threshold, and unfocused if retracting.
This allows the search bar to animate during the gesture
and take or release focus after the state change completes.
- AllAppsTransitionController lets the apps panel translate in
from the bottom of the screen, for example when coming from
an app and we don't want to pop it in halfway up the screen.
Instead it can slide in gracefully from behind the keyboard
and floating search bar.
- KeyboardInsetAnimationCallback can now notify listeners of
keyboard alpha changes during controlled animations. And
StateAnimationConfig has a new animation type to control
the keyboard alpha during the all apps transition.
- This new ANIM_ALL_APPS_KEYBOARD_FADE is used to pop the
keyboard in at the threshold for going from an app to all apps.
Note that its position moves linearly before this, so the
search bar starts moving up accordingly before the keyboard
alpha is non-0.
Fix: 266761289
Fix: 268845147
Fix: 267683921
Fix: 265849321
Fix: 266446733
Fix: 269301440
Bug: 275635606
Bug: 259619990
Bug: 261866704
Test: Manual with all the state transitions on phone and tablet
(also folding/unfolding foldable).
Flag: ENABLE_FLOATING_SEARCH_BAR, ENABLE_ALL_APPS_FROM_OVERVIEW
(latter just for the background app interpolator changes).
Change-Id: I6f06552e95747348a62260279626cf407bf145b0
There was one extra border space being added to handheld, which makes AllApps and Workspace icons to not align.
Fix: 284151671
Test: DeviceProfileDumpTest
Test: HomeScreenAllAppsImageTest
Test: DeviceProfileResponsiveDumpTest
Test: HomeScreenAllAppsImageTest
Flag: N/A
Change-Id: I6e4a0d93336a3c59db2a25805d90adfaf7a231cf
When a grid has a responsive spec and the feature flag is on, use the new calculations for the sizes in Workspace. This shouldn't affect Scalable grids.
Fix: 277064708
Test: HomeScreenImageTest
Test: DeviceProfileDumpTest
Test: ResponsiveHomeScreenImageTest
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: Idef3d17fbfa1b2e0c82c12e7784a7584f1ba1b88
This shouldn't change anything in the grids, only calculate the sizes of the grid.
Bug: 277064708
Test: CalculatedWorkspaceSpecTest
Test: WorkspaceSpecsTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: Id1f90ef44f5b869113d063bad17589e7e88d1d20
This shouldn't change anything in the grids, only support the creation of responsive grids in the future. For now, to check that the flag works, turn it on and check the dumpsys. There is also a dump test created for this.
Fix: 277064696
Fix: 277064702
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I1bef87043a100234bd661cd6ac00007fdc654116
Removing default widget padding logic. Also widget padding it applied
at ShortcutAndWidgetContainer so that the widgetView always has the
correct size.
Bug: 274826296
Bug: 257589413
Test: Verified using screenshots
Flags: N/A
Change-Id: Id4b5e94db6ec7b2aa3dca87b1e9ccc831b608cac
- Renamed variables to make it more clear what they represent
- DeviceProfile will be source of truth for taskbar
sizes
Bug: 265144213
Test: phone, multi-display, tablet
Change-Id: Id9c19d15a65894fd7645e0f876a4b6527b713c34
Flag: ENABLE_TRANSIENT_TASKBAR=true
Scale folder attrs if a full folder doesn't fit the screen width. This will make icons and text smaller than the workspace.
As a follow-up, another bug will be created to only scale full folders instead of all folders.
Bug: 271554689
Test: manually create a full folder, change the display size to large+
Change-Id: I47dc4bd4fe0c9eae989095fc1d179b81d350ef77
Otherwise we position the taskbar in the center.
Bug: 259712417
Fixes: 267997547
Test: transient taskbar unaffected
persistent taskbar
- test on small tablet
- test on large tablet
- test LTR and RTL
Change-Id: Ieb0a304d9963ebf583bc4ef2deaab747019e8d6d
Originally folder row and column for 5x5 grid was 3x3. This change is to update it to 4x4 in config to increase the max number of cells displayed. It also adds corresponding test for 5x5 grid and includes numFolderRows and numFolderColumns in the dump string
Fix: 265139500
Test: DeviceProfileDumpTest
Change-Id: I09fe3eac8113a147cb895988e5424471e4e772e5
Hotseat was overlapped with 3 navigation buttons in large screen RTL mode. This fix is to pad hotseat properly by swapping the left and right paddings in RTL mode
Bug: 268178394
Test: manual
Change-Id: I2b073a1b532bf3aae3ab1bec98ad70713742c672
Test: swipe to home with an app that has a notification dot
observe no jump in dot size
Bug: 264709741
Change-Id: I5d56fe57e74ed7b094477ecd8727152f3f522042
This is needed to easily spot unwanted DeviceProfile changes in perfetto traces, as each one causes many new inflation and slows down the ui thread considerably.
Test: recorded trace with this log
Bug: 258214245
Change-Id: I805d56d4dfe1c08d7f28215c0462d01fcaece84e
- DeviceProfileTest should use persistent taskbar in 3-button mode
Fix: 260596114
Test: DeviceProfileTest
Change-Id: Iadcca218dab2bc2eedc006c86dbbe3f9a0fa5e51
- Follow-up of http://ag/20691430
- Reduce iconDrawablePaddingPx to further recover space
- Then proportional reduce both iconSizePx and iconTextSizePx
- This will result in larger icon/text size in px when going from larger to largest for most devices
- For extremely large desnity (> largest for most devices), iconSizePx/iconTextSizePx will inevitably reduce due to smaller availalbe space
Fix: 264149604
Test: test different density between larger and largest, check that icon/text size continues to grow in px
Change-Id: I1633566b9372acf1393c7e997598cb3e46c4a507
- Use mTypeIndex instead of always INDEX_LANDSCAPE or INDEX_DEFAULT to make sure they follow the workspcae icon/text size
Fix: 262446829
Test: DeviceProfileDumpTest
Change-Id: I9fc37b41114a34e35108330a8d599556bff77eef
- Also removed transient_taskbar_two_panels_size and use sw720dp override instead, to be consistent with how we handle small vs large tablet in overview
- Also made isTransientTaskbar mockable so we can test that in DeviceProfileDumpTest
Bug: 260596114
Test: DeviceProfileDumpTest
Change-Id: I3c2236b95d91246e9581531478e3c97601cfb2ec
Change margin spaces and logic of how many items the hotseat and taskbar should show.
Fix: 246424857
Test: DeviceProfileDumpTest
Test: HotseatWidthCalculationTest
Change-Id: I8ec71c56a0aa362483c43d6400c762d12cf45f5b