mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Fade in/out taskbar bg alpha when unstash/stashing.
This prevents the case where we are drawing both the taskbar bg renderer and the stashed handle at the same time. Fixes: 287245176 Test: go home/overview, open/close notif shade, stash/unstash in app Change-Id: Ib025a0cf1ad5fd8a9afd079aa50210f3b2388d8e
This commit is contained in:
@@ -24,6 +24,7 @@ import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.anim.AnimatedFloat;
|
||||
import com.android.launcher3.util.DimensionUtils;
|
||||
import com.android.launcher3.util.MultiPropertyFactory.MultiProperty;
|
||||
import com.android.launcher3.util.TouchController;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
@@ -62,12 +63,14 @@ public class TaskbarDragLayerController implements TaskbarControllers.LoggableTa
|
||||
private TaskbarStashViaTouchController mTaskbarStashViaTouchController;
|
||||
private AnimatedFloat mOnBackgroundNavButtonColorIntensity;
|
||||
|
||||
private MultiProperty mBackgroundRendererAlpha;
|
||||
private float mLastSetBackgroundAlpha;
|
||||
|
||||
public TaskbarDragLayerController(TaskbarActivityContext activity,
|
||||
TaskbarDragLayer taskbarDragLayer) {
|
||||
mActivity = activity;
|
||||
mTaskbarDragLayer = taskbarDragLayer;
|
||||
mBackgroundRendererAlpha = mTaskbarDragLayer.getBackgroundRendererAlpha();
|
||||
final Resources resources = mTaskbarDragLayer.getResources();
|
||||
mFolderMargin = resources.getDimensionPixelSize(R.dimen.taskbar_folder_margin);
|
||||
}
|
||||
@@ -152,11 +155,15 @@ public class TaskbarDragLayerController implements TaskbarControllers.LoggableTa
|
||||
* mNotificationShadeBgTaskbar.value * mImeBgTaskbar.value
|
||||
* mAssistantBgTaskbar.value;
|
||||
mLastSetBackgroundAlpha = mBgOverride.value * Math.max(bgNavbar, bgTaskbar);
|
||||
mTaskbarDragLayer.setTaskbarBackgroundAlpha(mLastSetBackgroundAlpha);
|
||||
mBackgroundRendererAlpha.setValue(mLastSetBackgroundAlpha);
|
||||
|
||||
updateOnBackgroundNavButtonColorIntensity();
|
||||
}
|
||||
|
||||
public MultiProperty getBackgroundRendererAlphaForStash() {
|
||||
return mTaskbarDragLayer.getBackgroundRendererAlphaForStash();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the translation of the background during the swipe up gesture.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user