@Beta
public final class AndroidSupportInjection
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
inject(android.support.v4.app.Fragment fragment)
Injects
fragment if an associated AndroidInjector implementation
can be found, otherwise throws an IllegalArgumentException . |
public static void inject(android.support.v4.app.Fragment fragment)
fragment
if an associated AndroidInjector
implementation
can be found, otherwise throws an IllegalArgumentException
.
Uses the following algorithm to find the appropriate AndroidInjector<Fragment>
to
use to inject fragment
:
HasSupportFragmentInjector
, and if none do
fragment
's activity
if it implements
HasSupportFragmentInjector
, and if not
Application
if it implements HasSupportFragmentInjector
.
HasSupportFragmentInjector
, a IllegalArgumentException
is thrown.java.lang.IllegalArgumentException
- if no parent fragment, activity, or application implements
HasSupportFragmentInjector
.