Callback

In package com.nhaarman.acorn.android.transition

class com.nhaarman.acorn.android.transition.SceneTransition.Callback

A callback interface to be able to get notified when a SceneTransition ends. Implementers of SceneTransition.execute, must always invoke onComplete when the SceneTransition is finished. Optionally, attach can be invoked during the transition animation to have the view attached to the Scene before the animation ends.

Methods

abstract fun attach(viewController: ViewController)

An function that can optionally be invoked to attach given viewController to the Scene at any time during the transition.

When invoking this method, this must be done before onComplete, otherwise its invocation is ignored. If this method is not invoked at all, onComplete will take care of attaching the view to the Scene.

Parameters:
  • viewController: ViewController

    The ViewController which contains the View that is shown and the instance that can be attached to the Scene.

abstract fun onComplete(viewController: ViewController)

Implementers of SceneTransition.execute must invoke this method when the transition is finished. If no call to attach was made before invoking this method, given viewController will be attached to the Scene.

Parameters: