mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Fixed issue with expanded view incorrect position." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
bbd1e2e6ad
@@ -282,7 +282,7 @@ public class BubbleBarViewController {
|
||||
mBarView.setController(new BubbleBarView.Controller() {
|
||||
@Override
|
||||
public float getBubbleBarTranslationY() {
|
||||
return mBubbleStashController.getBubbleBarTranslationY();
|
||||
return mBubbleStashController.getTargetTranslationYForState();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user