Merge "Fixed issue with expanded view incorrect position." into main

This commit is contained in:
Mykola Podolian
2025-05-16 15:33:33 -07:00
committed by Android (Google) Code Review
3 changed files with 12 additions and 6 deletions

View File

@@ -282,7 +282,7 @@ public class BubbleBarViewController {
mBarView.setController(new BubbleBarView.Controller() {
@Override
public float getBubbleBarTranslationY() {
return mBubbleStashController.getBubbleBarTranslationY();
return mBubbleStashController.getTargetTranslationYForState();
}
@Override

View File

@@ -186,12 +186,14 @@ interface BubbleStashController {
fun getHandleViewAlpha(): MultiPropertyFactory<View>.MultiProperty? = null
/**
* Returns bubble bar Y position according to [isBubblesShowingOnHome] and
* [isBubblesShowingOnOverview] values. Default implementation only analyse
* [isBubblesShowingOnHome] and return translationY to align with the hotseat vertical center.
* For Other cases align bubbles with the taskbar.
* Default implementation only analyse [isBubblesShowingOnHome] and return value is equal to
* [targetTranslationYForState].
*/
val bubbleBarTranslationY: Float
get() = targetTranslationYForState
/** Returns bubble bar Y target position according to [isBubblesShowingOnHome] value. */
val targetTranslationYForState: Float
get() =
if (isBubblesShowingOnHome) {
bubbleBarTranslationYForHotseat

View File

@@ -104,6 +104,10 @@ class PersistentBubbleStashController(
return -bubbleBarVerticalCenterForHome + bubbleBarHeight / 2
}
/**
* Returns bubble bar Y target position according to [isBubblesShowingOnHome] value. Value could
* be adjusted to the display override progress.
*/
override val bubbleBarTranslationY: Float
get() =
if (inAppDisplayOverrideProgress > 0f && launcherState == BubbleLauncherState.HOME) {
@@ -116,7 +120,7 @@ class PersistentBubbleStashController(
Interpolators.LINEAR,
)
} else {
super.bubbleBarTranslationY
targetTranslationYForState
}
override var inAppDisplayOverrideProgress: Float = 0f