Search in sources :

Example 1 with Injector

use of proton.inject.Injector in project AndroidTraining by mixi-inc.

the class ProtonAccountAuthenticatorActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    Injector injector = Proton.getInjector(this);
    mObserverManager = injector.getInstance(ObserverManager.class);
    mStateEventObserver = injector.getInstance(StateEventObserver.class);
    injector.inject(this);
    super.onCreate(savedInstanceState);
    mObserverManager.fire(new OnCreateEvent(savedInstanceState));
}
Also used : Injector(proton.inject.Injector) StateEventObserver(proton.inject.state.StateEventObserver) OnCreateEvent(proton.inject.observer.event.OnCreateEvent) ObserverManager(proton.inject.observer.ObserverManager)

Example 2 with Injector

use of proton.inject.Injector in project AndroidTraining by mixi-inc.

the class ProtonActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    Injector injector = Proton.getInjector(this);
    mObserverManager = injector.getInstance(ObserverManager.class);
    mStateEventObserver = injector.getInstance(StateEventObserver.class);
    injector.inject(this);
    super.onCreate(savedInstanceState);
    mObserverManager.fire(new OnCreateEvent(savedInstanceState));
}
Also used : Injector(proton.inject.Injector) StateEventObserver(proton.inject.state.StateEventObserver) OnCreateEvent(proton.inject.observer.event.OnCreateEvent) ObserverManager(proton.inject.observer.ObserverManager)

Example 3 with Injector

use of proton.inject.Injector in project AndroidTraining by mixi-inc.

the class ProtonFragmentActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    Injector injector = Proton.getInjector(this);
    mObserverManager = injector.getInstance(ObserverManager.class);
    mStateEventObserver = injector.getInstance(StateEventObserver.class);
    injector.inject(this);
    super.onCreate(savedInstanceState);
    mObserverManager.fire(new OnCreateEvent(savedInstanceState));
}
Also used : Injector(proton.inject.Injector) StateEventObserver(proton.inject.state.StateEventObserver) OnCreateEvent(proton.inject.observer.event.OnCreateEvent) ObserverManager(proton.inject.observer.ObserverManager)

Example 4 with Injector

use of proton.inject.Injector in project AndroidTraining by mixi-inc.

the class ProtonPreferenceActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    Injector injector = Proton.getInjector(this);
    mObserverManager = injector.getInstance(ObserverManager.class);
    mStateEventObserver = injector.getInstance(StateEventObserver.class);
    injector.inject(this);
    super.onCreate(savedInstanceState);
    mObserverManager.fire(new OnCreateEvent(savedInstanceState));
}
Also used : Injector(proton.inject.Injector) StateEventObserver(proton.inject.state.StateEventObserver) OnCreateEvent(proton.inject.observer.event.OnCreateEvent) ObserverManager(proton.inject.observer.ObserverManager)

Example 5 with Injector

use of proton.inject.Injector in project AndroidTraining by mixi-inc.

the class ProtonIntentService method onCreate.

@Override
public void onCreate() {
    Injector injector = Proton.getInjector(this);
    mObserverManager = injector.getInstance(ObserverManager.class);
    injector.inject(this);
    super.onCreate();
    mObserverManager.fire(new OnCreateEvent(null));
}
Also used : Injector(proton.inject.Injector) OnCreateEvent(proton.inject.observer.event.OnCreateEvent) ObserverManager(proton.inject.observer.ObserverManager)

Aggregations

Injector (proton.inject.Injector)9 ObserverManager (proton.inject.observer.ObserverManager)9 OnCreateEvent (proton.inject.observer.event.OnCreateEvent)9 StateEventObserver (proton.inject.state.StateEventObserver)6 Bundle (android.os.Bundle)1 ArrayList (java.util.ArrayList)1 MockContext (proton.inject.MockContext)1 OnDestroyEvent (proton.inject.observer.event.OnDestroyEvent)1 OnSaveInstanceStateEvent (proton.inject.observer.event.OnSaveInstanceStateEvent)1