Initializer

open class Initializer<CTX : IviPopOverContext, F : IviPopOverFragment<CTX, *>>(val popOverFragment: F, iviPopOverContext: CTX)

Helper class to initialize the given popOverFragment with IviPopOverContext or its derivation.

This replaces the approach of having a constructor on the fragment with the context as parameter on the concrete class. Having a constructor with arguments on Fragment's derived classes is not a recommended practice by Android for (see its constructor's documentation). This also helps to avoid engineers forgetting to initialize the fragment after creating it.

Parameters

CTX

The type of the context used to hold this fragment's dependencies.

F

The type of the fragment to be initialized.

popOverFragment

The fragment to be initialized.

iviPopOverContext

The context holding the dependencies.

Constructors

Link copied to clipboard
constructor(popOverFragment: F, iviPopOverContext: CTX)

Properties

Link copied to clipboard