@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 to use to
inject fragment:
HasAndroidInjector or HasSupportFragmentInjector, and if none do
fragment's activity if it implements
HasAndroidInjector or HasSupportFragmentInjector, and if not
Application if it implements HasAndroidInjector
HasSupportFragmentInjector.
HasAndroidInjector or HasSupportFragmentInjector, a
IllegalArgumentException is thrown.java.lang.IllegalArgumentException - if no parent fragment, activity, or application implements
HasAndroidInjector or HasSupportFragmentInjector.