mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
[Predictive Back] Fix predictive back swipe on task bar all apps [1/n]
For taskbar all apps, the background scrim is child view of AbstractSlideInView, thus scaling AbstracSlideInView during PB swipe will scale down background scrim. There is no need to re-apply scale effect on background scrim separately. Bug: 327490078 Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TEAMFOOD Test: manual Change-Id: I125670d14bc788664a1371008589e4106496ae2e
This commit is contained in:
@@ -196,7 +196,13 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView<TaskbarOverla
|
||||
|
||||
@Override
|
||||
protected void dispatchDraw(Canvas canvas) {
|
||||
mAppsView.drawOnScrimWithScale(canvas, mSlideInViewScale.value);
|
||||
// We should call drawOnScrimWithBottomOffset() rather than drawOnScrimWithScale(). Because
|
||||
// for taskbar all apps, the scrim view is a child view of AbstractSlideInView. Thus scaling
|
||||
// down in AbstractSlideInView#onScaleProgressChanged() with SCALE_PROPERTY has already
|
||||
// done the job - there is no need to re-apply scale effect here. But it also means we need
|
||||
// to pass extra bottom offset to background scrim to fill the bottom gap during predictive
|
||||
// back swipe.
|
||||
mAppsView.drawOnScrimWithBottomOffset(canvas, getBottomOffsetPx());
|
||||
super.dispatchDraw(canvas);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user