TriggerBuilders


public final class TriggerBuilders


Builders for triggers that can be used to start an animation.

Summary

Nested types

@RequiresSchemaVersion(major = 1, minor = 200)
public interface TriggerBuilders.Trigger

Interface defining the triggers that can be fired.

Public methods

static @NonNull TriggerBuilders.Trigger
@RequiresSchemaVersion(major = 1, minor = 200)
createOnConditionMetTrigger(
    @NonNull DynamicBuilders.DynamicBool dynamicBool
)

Creates a Trigger that fires *every time* the condition switches from false to true.

static @NonNull TriggerBuilders.Trigger
@RequiresSchemaVersion(major = 1, minor = 200)
createOnLoadTrigger()

Creates a Trigger that fires immediately when the layout is loaded / reloaded.

Public methods

createOnConditionMetTrigger

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
public static @NonNull TriggerBuilders.Trigger createOnConditionMetTrigger(
    @NonNull DynamicBuilders.DynamicBool dynamicBool
)

Creates a Trigger that fires *every time* the condition switches from false to true. If the condition is true initially, that will fire the trigger on load.

createOnLoadTrigger

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
public static @NonNull TriggerBuilders.Trigger createOnLoadTrigger()

Creates a Trigger that fires immediately when the layout is loaded / reloaded.