Draw rounded corners above the taskbar

- Increase height of taskbar window, but not contentInsets
- Draw the inverted corners as part of TaskbarDragLayer#dispatchDraw() (which handles the background already)

Test: visual

Bug: 196257194
Change-Id: I51d992078579e877c85a1d71ee4c00d85fd9db2e
This commit is contained in:
Tony Wickham
2021-08-13 17:03:55 -07:00
parent 0aa2549a2f
commit 157d3b950d
4 changed files with 73 additions and 8 deletions

View File

@@ -165,8 +165,9 @@ public class TaskbarViewController {
int offsetY = launcherDp.getTaskbarOffsetY();
setter.setFloat(mTaskbarIconTranslationYForHome, VALUE, -offsetY, LINEAR);
int collapsedHeight = mActivity.getDeviceProfile().taskbarSize;
int expandedHeight = collapsedHeight + offsetY;
int collapsedHeight = mActivity.getDefaultTaskbarWindowHeight();
int expandedHeight = Math.max(collapsedHeight,
mActivity.getDeviceProfile().taskbarSize + offsetY);
setter.addOnFrameListener(anim -> mActivity.setTaskbarWindowHeight(
anim.getAnimatedFraction() > 0 ? expandedHeight : collapsedHeight));