Package 

Class KatanaFragmentDelegate


  • 
    public final class KatanaFragmentDelegate<T extends Fragment>
    
                        

    Usually Katana components of Fragments depend on components of the parent Activity.

    Since Fragments are instantiated before Activities, the component initialization must be delayed until the Activity was created.

    The delegate simplifies this procedure a bit. A delegate is for example created in the init block of the Fragment via fragmentDelegate. onActivityCreated of the delegate must be called in Fragment.onActivityCreated. The lambda passed to the delegate is called when onActivityCreated was called. Inside the lambda component initialization and dependency injection should be performed.

    • Method Summary

      Modifier and Type Method Description
      final Unit onActivityCreated(Bundle savedInstanceState) Must be called in Fragment.onActivityCreated of Fragment associated with this delegate.
      • Methods inherited from class org.rewedigital.katana.android.fragment.KatanaFragmentDelegate

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait