ViewKt

Added in 1.2.0

public final class ViewKt


Summary

Public methods

static final @NonNull F
<F extends Fragment> findFragment(@NonNull View receiver)

Find a Fragment associated with a View.

Public methods

findFragment

public static final @NonNull F <F extends Fragment> findFragment(@NonNull View receiver)

Find a Fragment associated with a View.

This method will locate the Fragment associated with this view. This is automatically populated for the View returned by Fragment.onCreateView and its children.

Calling this on a View that does not have a Fragment set will result in an IllegalStateException