use of roboguice.inject.RoboInjector in project roboguice by roboguice.
the class RoboGuice method destroyInjector.
public static void destroyInjector(Context context) {
final RoboInjector injector = getInjector(context);
injector.getInstance(EventManager.class).destroy();
//noinspection SuspiciousMethodCalls
// it's okay, Context is an Application
injectors.remove(context);
}
use of roboguice.inject.RoboInjector in project roboguice by roboguice.
the class RoboActionBarActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
final RoboInjector injector = RoboGuice.getInjector(this);
eventManager = injector.getInstance(EventManager.class);
injector.injectMembersWithoutViews(this);
super.onCreate(savedInstanceState);
eventManager.fire(new OnCreateEvent<Activity>(this, savedInstanceState));
}
use of roboguice.inject.RoboInjector in project roboguice by roboguice.
the class RoboActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
stopwatch = new Stopwatch();
final RoboInjector injector = RoboGuice.getInjector(this);
stopwatch.resetAndLog("RoboActivity creation of injector");
eventManager = injector.getInstance(EventManager.class);
stopwatch.resetAndLog("RoboActivity creation of eventmanager");
injector.injectMembersWithoutViews(this);
stopwatch.resetAndLog("RoboActivity inject members without views");
super.onCreate(savedInstanceState);
stopwatch.resetAndLog("RoboActivity super onCreate");
eventManager.fire(new OnCreateEvent<Activity>(this, savedInstanceState));
stopwatch.resetAndLog("RoboActivity fire event");
}
use of roboguice.inject.RoboInjector in project roboguice by roboguice.
the class RoboSherlockActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
final RoboInjector injector = RoboGuice.getInjector(this);
eventManager = injector.getInstance(EventManager.class);
injector.injectMembersWithoutViews(this);
super.onCreate(savedInstanceState);
eventManager.fire(new OnCreateEvent<Activity>(this, savedInstanceState));
}
use of roboguice.inject.RoboInjector in project roboguice by roboguice.
the class RoboLauncherActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
final RoboInjector injector = RoboGuice.getInjector(this);
eventManager = injector.getInstance(EventManager.class);
injector.injectMembersWithoutViews(this);
super.onCreate(savedInstanceState);
eventManager.fire(new OnCreateEvent<Activity>(this, savedInstanceState));
}
Aggregations