ClassicSRIATViewsHolderSmoothScrollTo Method |
Utility to smooth scroll. The scroll is animated (scroll is done gradually, throughout multiple frames)
Namespace:
frame8.ScrollRectItemsAdapter.Classic
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntaxpublic virtual bool SmoothScrollTo(
int itemIndex,
float duration = 0.75f,
float normalizedOffsetFromViewportStart = 0f,
float normalizedPositionOfItemPivotToUse = 0f,
Action onDone = null,
bool overrideCurrentScrollingAnimation = false
)
Parameters
- itemIndex
- Type: SystemInt32
- duration (Optional)
- Type: SystemSingle
- normalizedOffsetFromViewportStart (Optional)
- Type: SystemSingle
- normalizedPositionOfItemPivotToUse (Optional)
- Type: SystemSingle
- onDone (Optional)
- Type: SystemAction
- overrideCurrentScrollingAnimation (Optional)
- Type: SystemBoolean
Return Value
Type:
BooleanIf content size smaller or equal to viweport size, returns false. Else, returns if no smooth scroll animation was already playing or
overrideCurrentScrollingAnimation is true
Version InformationOptimized ScrollView Adapter
Supported in: 4.0, 3.0
See Also