FullWidthDetailsOverviewSharedElementHelper

public class FullWidthDetailsOverviewSharedElementHelper extends FullWidthDetailsOverviewRowPresenter.Listener


Helper class to assist delayed shared element activity transition for view created by FullWidthDetailsOverviewRowPresenter. User must call setSharedElementEnterTransition during activity onCreate() and call setListener. The helper implements FullWidthDetailsOverviewRowPresenter.Listener and starts delayed activity transition once onBindLogo is called.

Summary

Public methods

boolean

Returns true if auto startPostponedEnterTransition() when bound to logo.

void

notifyOnBindLogo is called.

void

Enable or disable auto startPostponedEnterTransition() when bound to logo.

void
setSharedElementEnterTransition(
    Activity activity,
    String sharedElementName
)
void
setSharedElementEnterTransition(
    Activity activity,
    String sharedElementName,
    long timeoutMs
)
void

Manually start postponed enter transition.

Public constructors

FullWidthDetailsOverviewSharedElementHelper

Added in 1.1.0
public FullWidthDetailsOverviewSharedElementHelper()

Public methods

getAutoStartSharedElementTransition

Added in 1.1.0
public boolean getAutoStartSharedElementTransition()

Returns true if auto startPostponedEnterTransition() when bound to logo. When it's disabled, app must call startPostponedEnterTransition to kick off windowEnterTransition. By default, it is disabled when there is no windowEnterSharedElementTransition set on the activity.

onBindLogo

public void onBindLogo(FullWidthDetailsOverviewRowPresenter.ViewHolder vh)

notifyOnBindLogo is called.

Parameters
FullWidthDetailsOverviewRowPresenter.ViewHolder vh

The ViewHolder that has bound logo view.

setAutoStartSharedElementTransition

Added in 1.1.0
public void setAutoStartSharedElementTransition(boolean enabled)

Enable or disable auto startPostponedEnterTransition() when bound to logo. When it's disabled, app must call startPostponedEnterTransition to kick off windowEnterTransition. By default, it is disabled when there is no windowEnterSharedElementTransition set on the activity.

setSharedElementEnterTransition

Added in 1.1.0
public void setSharedElementEnterTransition(
    Activity activity,
    String sharedElementName
)

setSharedElementEnterTransition

Added in 1.1.0
public void setSharedElementEnterTransition(
    Activity activity,
    String sharedElementName,
    long timeoutMs
)

startPostponedEnterTransition

Added in 1.1.0
public void startPostponedEnterTransition()

Manually start postponed enter transition.