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.

See also

Constructors

KatanaFragmentDelegate
Link copied to clipboard
KatanaFragmentDelegate<TKatanaFragmentDelegate<T extends Fragment>(T fragment, Function3<T, Activity, Bundle, UnitonInject)

Functions

equals
Link copied to clipboard
Boolean equals(Object other)
hashCode
Link copied to clipboard
Integer hashCode()
onActivityCreated
Link copied to clipboard
final Unit onActivityCreated(Bundle savedInstanceState)
Must be called in Fragment.onActivityCreated of Fragment associated with this delegate.
toString
Link copied to clipboard
String toString()