Click or drag to resize

OSATParams, TItemViewsHolderSmoothBringToView Method

Similar to SmoothScrollTo(Int32, Single, Single, Single, FuncSingle, Boolean, Boolean) (see it for more info about the other params), but scrolls the content only by the minimum needed amount to make the item fully visible and optionally adding some spacing as specified by spacingFromViewportEdge

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

Parameters

itemIndex
Type: SystemInt32
duration
Type: SystemSingle
spacingFromViewportEdge (Optional)
Type: SystemNullableSingle
if not set, ContentSpacing will be used. Set to 0 to align the item's edge to the viewport's edge exactly, with no spacing
onProgress (Optional)
Type: SystemFuncSingle, Boolean
overrideCurrentScrollingAnimation (Optional)
Type: SystemBoolean

Return Value

Type: Boolean
True, if the animation started. For details, see also the return value of SmoothScrollTo(Int32, Single, Single, Single, FuncSingle, Boolean, Boolean)
Version Information

Optimized ScrollView Adapter

Supported in: 4.1
See Also