Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a05a99e authored by burakov's avatar burakov
Browse files

[flexiglass] Animate the Bouncer up when exiting, shorten distance.

Fix: 436805728
Test: Manually tested by opening the bouncer and unlocking the device.
Flag: com.android.systemui.scene_container
Change-Id: Id31cb99eeaee73053cf0f2facdb2824fa0b27832
parent ee7c900a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ import com.android.compose.animation.scene.TransitionBuilder
import com.android.compose.animation.scene.UserActionDistance
import com.android.systemui.bouncer.ui.composable.Bouncer

val BOUNCER_INITIAL_TRANSLATION = 300.dp
val BOUNCER_INITIAL_TRANSLATION = 48.dp

fun TransitionBuilder.fromBouncerTransition() {
    spec = tween(durationMillis = 500)
@@ -32,7 +32,7 @@ fun TransitionBuilder.fromBouncerTransition() {
        fromContentSize.height * TO_BOUNCER_SWIPE_DISTANCE_FRACTION
    }

    translate(Bouncer.Elements.Content, y = BOUNCER_INITIAL_TRANSLATION)
    translate(Bouncer.Elements.Content, y = -BOUNCER_INITIAL_TRANSLATION)
    fractionRange(end = TO_BOUNCER_FADE_FRACTION) { fade(Bouncer.Elements.Background) }
    fractionRange(start = TO_BOUNCER_FADE_FRACTION) { fade(Bouncer.Elements.Content) }
}