public final class NavArgsLazy<Args extends NavArgs> implements Lazy


An implementation of Lazy used by android.app.Activity.navArgs and androidx.fragment.app.Fragment.navArgs.

argumentProducer is a lambda that will be called during initialization to provide arguments to construct an Args instance via reflection.

Summary

Public constructors

<Args extends NavArgs> NavArgsLazy(
    @NonNull KClass<@NonNull Args> navArgsClass,
    @NonNull Function0<@NonNull Bundle> argumentProducer
)

Public methods

@NonNull Args
boolean

Public constructors

public <Args extends NavArgs> NavArgsLazy(
    @NonNull KClass<@NonNull Args> navArgsClass,
    @NonNull Function0<@NonNull Bundle> argumentProducer
)

Public methods

getValue

Added in 1.0.0
public @NonNull Args getValue()

isInitialized

Added in 1.0.0
public boolean isInitialized()