Fix various animation issues when total width of grid tasks < screen width
Bug fixes: - Unusual long scroll when only focus task left after split select - Animation jump when tasks cannot fit screen width after dismiss or split select To fix the above issue, generified calculations when total grid task width < screen width: - Removed some special case handling when only focus task left (getSnapToFocusedTaskScrollDiff), and instead replace with generic logic that calculation that extra scroll position (shortTotalCompensation) needed when long row width is smaller than the grid size - Fixed snapped task grid translation calculation to account for shortTotalCompensation - Last task scroll calculation should account for shortTotalCompensation too - Calculate the expected shortTotalCompensation after dismiss, and use that to adjust the close gap between clearAll distance splitScrollOffset that we applied during split screen does not work well when shortTotalCompensation != 0. splitScrollOffset is not a good solution to handle split placeholder, as it allow tasks to scroll to weird position. I removed splitScrollOffset completely, and only apply split translation when split placeholder covers the tasks: - Removed splitScrollOffset on TaskView/ClearAll, so scroll position of TaskView will not change while in split to splify things. - When split placehodler will cover task's natural position (taskSize) in overview grid, apply split translation on all tasks similar to handheld - Removed isSplitPlaceholderFirstInGrid/isSplitPlaceholderLastInGrid adjustments Bug: 257952455 Test: Enter overview from home Test: Enter overview from app, with variations that quick switch and enter Test: Dismiss task from different position Test: Split select task from different position Test: Repeat with/without GRID_ONLY_OVERVIEW flag Test: Repeat with handheld Change-Id: I7689b5384845f03491041b6d910835c9ac4fab08
Loading
Please register or sign in to comment