Click or drag to resize

OSATParams, TItemViewsHolderSmoothScrollTo Method

Utility to smooth scroll. Identical to ScrollTo(Int32, Single, Single) in functionality, but the scroll is animated (scroll is done gradually, throughout multiple frames)

Namespace:  Com.ForbiddenByte.OSA.Core
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public virtual bool SmoothScrollTo(
	int itemIndex,
	float duration,
	float normalizedOffsetFromViewportStart = 0f,
	float normalizedPositionOfItemPivotToUse = 0f,
	Func<float, bool> onProgress = null,
	bool overrideCurrentScrollingAnimation = false
)

Parameters

itemIndex
Type: SystemInt32
duration
Type: SystemSingle
normalizedOffsetFromViewportStart (Optional)
Type: SystemSingle
normalizedPositionOfItemPivotToUse (Optional)
Type: SystemSingle
onProgress (Optional)
Type: SystemFuncSingle, Boolean
gets the progress (0f..1f) and returns if the scrolling should continue
overrideCurrentScrollingAnimation (Optional)
Type: SystemBoolean

Return Value

Type: Boolean
True, if no smooth scroll animation was already playing or overrideCurrentScrollingAnimation is true

Implements

IOSASmoothScrollTo(Int32, Single, Single, Single, FuncSingle, Boolean, Boolean)
Version Information

Optimized ScrollView Adapter

Supported in: 4.1
See Also