Skip to main content

startStateTransitionWithIndex

startStateTransitionWithIndex

Runs a State Transition targeting the item at the given index. Use it when you want the transition to apply to a single item in a repeating (list) layout. This index points to the repeated item the transition applies to — don't confuse it with the index in setStateTransitionProperty, which is a step number within the transition.

Parameters

NameTypeDescription
transitionIDStringThe id of the state transition to run
indexintThe index of the repeating-layout item the transition applies to
onEndJSFunction?Callback invoked when the transition finishes (takes no arguments). Optional (null)
durationdouble?Overrides the duration in seconds. Omit (null) to keep the duration configured on the state transition

Returns: void

Example

$act.startStateTransitionWithIndex("highlightRow", 2, function () {
$log.d("전환 완료");
}, 0.3);

Related

  • $act.startStateTransition(transitionID, onEnd, duration) — applies to a single target without an index
  • $act.stopStateTransition(transitionID) — stops a running transition
  • $act.setStateTransitionProperty(transitionID, index, property, value) — changes a property value on a specific step of the transition