Class FragmentHostCallback<E>

java.lang.Object
icyllis.modernui.fragment.FragmentHostCallback<E>
Type Parameters:
E - the type of object that's currently hosting the fragments. An instance of this class must be returned by onGetHost().

public abstract class FragmentHostCallback<E> extends Object
Integration points with the Fragment host.

Fragments may be hosted by any object. In order to host fragments, implement FragmentHostCallback, overriding the methods applicable to the host.

FragmentManager changes its behavior based on what optional interfaces your FragmentHostCallback implements. This includes the following:

  • Constructor Details

  • Method Details

    • onDump

      public void onDump(@NonNull String prefix, @Nullable FileDescriptor fd, @NonNull PrintWriter writer, @Nullable String... args)
      Print internal state into the given stream.
      Parameters:
      prefix - Desired prefix to prepend at each line of output.
      fd - The raw file descriptor that the dump is being sent to.
      writer - The PrintWriter to which you should dump your state. This will be closed for you after you return.
      args - additional arguments to the dump request.
    • onGetHost

      @Nullable public abstract E onGetHost()
      Return the object that's currently hosting the fragment.
    • onFindViewById

      @Nullable public View onFindViewById(int id)
    • onHasView

      public boolean onHasView()