public abstract class LoaderContext extends Object
| Modifier and Type | Method and Description |
|---|---|
static LoaderContext |
contextFrom(Fragment fragment)
Returns a context wrapping the specified fragment.
|
static LoaderContext |
contextFrom(FragmentActivity activity)
Returns a context wrapping the specified activity.
|
static LoaderContext |
contextFrom(FragmentActivity activity,
Context context)
Returns a context wrapping the specified activity, with the specified instance as base
context.
In order to prevent undesired leaks, the class of the specified context must be static. |
static LoaderContext |
contextFrom(Fragment fragment,
Context context)
Returns a context wrapping the specified fragment, with the specified instance as base
context.
In order to prevent undesired leaks, the class of the specified context must be static. |
abstract Object |
getComponent()
Returns the wrapped component.
|
abstract Context |
getLoaderContext()
Returns the loader context.
|
abstract LoaderManager |
getLoaderManager()
Returns the loader manager of the specific component.
|
@Nonnull public static LoaderContext contextFrom(@Nonnull Fragment fragment)
fragment - the fragment instance.@Nonnull public static LoaderContext contextFrom(@Nonnull Fragment fragment, @Nonnull Context context)
fragment - the fragment instance.context - the context used to get the application one.@Nonnull public static LoaderContext contextFrom(@Nonnull FragmentActivity activity)
activity - the activity instance.@Nonnull public static LoaderContext contextFrom(@Nonnull FragmentActivity activity, @Nonnull Context context)
activity - the activity instance.context - the context used to get the application one.@Nullable public abstract Object getComponent()
@Nullable public abstract Context getLoaderContext()
@Nullable public abstract LoaderManager getLoaderManager()