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

Commit dab40373 authored by omarmt's avatar omarmt
Browse files

[flexiglass] new defaultOverscrollProgressConverter

This new overscroll progress starts linearly with some resistance and
slowly approaches 0.2f.
Before and after attached to b/299343829#comment6

Test: Manually tested on Flexiglass
Bug: 299343829
Flag: com.android.systemui.scene_container
Change-Id: Ifc96ebc63a0b2a714323065f11709d2209f72470
parent 2307093d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ package com.android.systemui.scene.ui.composable

import androidx.compose.foundation.gestures.Orientation
import com.android.compose.animation.scene.Edge
import com.android.compose.animation.scene.ProgressConverter
import com.android.compose.animation.scene.transitions
import com.android.systemui.bouncer.ui.composable.Bouncer
import com.android.systemui.notifications.ui.composable.Notifications
@@ -41,6 +42,9 @@ import com.android.systemui.shade.ui.composable.Shade
 */
val SceneContainerTransitions = transitions {

    // Overscroll progress starts linearly with some resistance (3f) and slowly approaches 0.2f
    defaultOverscrollProgressConverter = ProgressConverter.tanh(maxProgress = 0.2f, tilt = 3f)

    // Scene transitions

    from(Scenes.Bouncer, to = Scenes.Gone) { bouncerToGoneTransition() }