Merge "Make Back arrow stroke appear earlier" into udc-dev am: b185da2a58
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23381398 Change-Id: Idc2818f999886fd705dd0eb971ffd6e3c21bb9b8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -607,7 +607,7 @@ class BackPanelController internal constructor(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private var previousPreThresholdWidthInterpolator = params.entryWidthTowardsEdgeInterpolator
|
private var previousPreThresholdWidthInterpolator = params.entryWidthInterpolator
|
||||||
private fun preThresholdWidthStretchAmount(progress: Float): Float {
|
private fun preThresholdWidthStretchAmount(progress: Float): Float {
|
||||||
val interpolator = run {
|
val interpolator = run {
|
||||||
val isPastSlop = totalTouchDeltaInactive > viewConfiguration.scaledTouchSlop
|
val isPastSlop = totalTouchDeltaInactive > viewConfiguration.scaledTouchSlop
|
||||||
|
|||||||
@@ -147,8 +147,21 @@ data class EdgePanelParams(private var resources: Resources) {
|
|||||||
val flungCommittedWidthSpring = createSpring(10000f, 1f)
|
val flungCommittedWidthSpring = createSpring(10000f, 1f)
|
||||||
val flungCommittedHeightSpring = createSpring(10000f, 1f)
|
val flungCommittedHeightSpring = createSpring(10000f, 1f)
|
||||||
|
|
||||||
val entryIndicatorAlphaThreshold = .23f
|
val commonArrowDimensAlphaThreshold = .165f
|
||||||
val entryIndicatorAlphaFactor = 1.05f
|
val commonArrowDimensAlphaFactor = 1.05f
|
||||||
|
val commonArrowDimensAlphaSpring = Step(
|
||||||
|
threshold = commonArrowDimensAlphaThreshold,
|
||||||
|
factor = commonArrowDimensAlphaFactor,
|
||||||
|
postThreshold = createSpring(180f, 0.9f),
|
||||||
|
preThreshold = createSpring(2000f, 0.6f)
|
||||||
|
)
|
||||||
|
val commonArrowDimensAlphaSpringInterpolator = Step(
|
||||||
|
threshold = commonArrowDimensAlphaThreshold,
|
||||||
|
factor = commonArrowDimensAlphaFactor,
|
||||||
|
postThreshold = 1f,
|
||||||
|
preThreshold = 0f
|
||||||
|
)
|
||||||
|
|
||||||
entryIndicator = BackIndicatorDimens(
|
entryIndicator = BackIndicatorDimens(
|
||||||
horizontalTranslation = getDimen(R.dimen.navigation_edge_entry_margin),
|
horizontalTranslation = getDimen(R.dimen.navigation_edge_entry_margin),
|
||||||
scale = getDimenFloat(R.dimen.navigation_edge_entry_scale),
|
scale = getDimenFloat(R.dimen.navigation_edge_entry_scale),
|
||||||
@@ -162,18 +175,8 @@ data class EdgePanelParams(private var resources: Resources) {
|
|||||||
alpha = 0f,
|
alpha = 0f,
|
||||||
lengthSpring = createSpring(600f, 0.4f),
|
lengthSpring = createSpring(600f, 0.4f),
|
||||||
heightSpring = createSpring(600f, 0.4f),
|
heightSpring = createSpring(600f, 0.4f),
|
||||||
alphaSpring = Step(
|
alphaSpring = commonArrowDimensAlphaSpring,
|
||||||
threshold = entryIndicatorAlphaThreshold,
|
alphaInterpolator = commonArrowDimensAlphaSpringInterpolator
|
||||||
factor = entryIndicatorAlphaFactor,
|
|
||||||
postThreshold = createSpring(200f, 1f),
|
|
||||||
preThreshold = createSpring(2000f, 0.6f)
|
|
||||||
),
|
|
||||||
alphaInterpolator = Step(
|
|
||||||
threshold = entryIndicatorAlphaThreshold,
|
|
||||||
factor = entryIndicatorAlphaFactor,
|
|
||||||
postThreshold = 1f,
|
|
||||||
preThreshold = 0f
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
backgroundDimens = BackgroundDimens(
|
backgroundDimens = BackgroundDimens(
|
||||||
alpha = 1f,
|
alpha = 1f,
|
||||||
@@ -188,20 +191,6 @@ data class EdgePanelParams(private var resources: Resources) {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
val preThresholdAndActiveIndicatorAlphaThreshold = .355f
|
|
||||||
val preThresholdAndActiveIndicatorAlphaFactor = 1.05f
|
|
||||||
val preThresholdAndActiveAlphaSpring = Step(
|
|
||||||
threshold = preThresholdAndActiveIndicatorAlphaThreshold,
|
|
||||||
factor = preThresholdAndActiveIndicatorAlphaFactor,
|
|
||||||
postThreshold = createSpring(180f, 0.9f),
|
|
||||||
preThreshold = createSpring(2000f, 0.6f)
|
|
||||||
)
|
|
||||||
val preThresholdAndActiveAlphaSpringInterpolator = Step(
|
|
||||||
threshold = preThresholdAndActiveIndicatorAlphaThreshold,
|
|
||||||
factor = preThresholdAndActiveIndicatorAlphaFactor,
|
|
||||||
postThreshold = 1f,
|
|
||||||
preThreshold = 0f
|
|
||||||
)
|
|
||||||
activeIndicator = BackIndicatorDimens(
|
activeIndicator = BackIndicatorDimens(
|
||||||
horizontalTranslation = getDimen(R.dimen.navigation_edge_active_margin),
|
horizontalTranslation = getDimen(R.dimen.navigation_edge_active_margin),
|
||||||
scale = getDimenFloat(R.dimen.navigation_edge_active_scale),
|
scale = getDimenFloat(R.dimen.navigation_edge_active_scale),
|
||||||
@@ -214,8 +203,8 @@ data class EdgePanelParams(private var resources: Resources) {
|
|||||||
alpha = 1f,
|
alpha = 1f,
|
||||||
lengthSpring = activeCommittedArrowLengthSpring,
|
lengthSpring = activeCommittedArrowLengthSpring,
|
||||||
heightSpring = activeCommittedArrowHeightSpring,
|
heightSpring = activeCommittedArrowHeightSpring,
|
||||||
alphaSpring = preThresholdAndActiveAlphaSpring,
|
alphaSpring = commonArrowDimensAlphaSpring,
|
||||||
alphaInterpolator = preThresholdAndActiveAlphaSpringInterpolator
|
alphaInterpolator = commonArrowDimensAlphaSpringInterpolator
|
||||||
),
|
),
|
||||||
backgroundDimens = BackgroundDimens(
|
backgroundDimens = BackgroundDimens(
|
||||||
alpha = 1f,
|
alpha = 1f,
|
||||||
@@ -242,8 +231,8 @@ data class EdgePanelParams(private var resources: Resources) {
|
|||||||
alpha = 1f,
|
alpha = 1f,
|
||||||
lengthSpring = createSpring(100f, 0.6f),
|
lengthSpring = createSpring(100f, 0.6f),
|
||||||
heightSpring = createSpring(100f, 0.6f),
|
heightSpring = createSpring(100f, 0.6f),
|
||||||
alphaSpring = preThresholdAndActiveAlphaSpring,
|
alphaSpring = commonArrowDimensAlphaSpring,
|
||||||
alphaInterpolator = preThresholdAndActiveAlphaSpringInterpolator
|
alphaInterpolator = commonArrowDimensAlphaSpringInterpolator
|
||||||
),
|
),
|
||||||
backgroundDimens = BackgroundDimens(
|
backgroundDimens = BackgroundDimens(
|
||||||
alpha = 1f,
|
alpha = 1f,
|
||||||
|
|||||||
Reference in New Issue
Block a user