当前位置: 首页>>代码示例>>Java>>正文


Java EventManager类代码示例

本文整理汇总了Java中roboguice.event.EventManager的典型用法代码示例。如果您正苦于以下问题:Java EventManager类的具体用法?Java EventManager怎么用?Java EventManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


EventManager类属于roboguice.event包,在下文中一共展示了EventManager类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import roboguice.event.EventManager; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
	// We want to skip the real functionality of Activity (even though it's
	// shadowed and just test the firing of events)
	Robolectric.bindShadowClass(ShadowActivity.class);

	// Our mock event manager - we'll check on it for fired events
	mockEventManager = mock(EventManager.class);

	// initialize RoboGuice
	RoboGuice.setBaseApplicationInjector(Robolectric.application,
			Stage.DEVELOPMENT,
			RoboGuice.newDefaultRoboModule(Robolectric.application),
			new TestModule(mockEventManager));

	// Our activity under test
	activity = activityClass.newInstance();

	// We need to initialize it
	call("onCreate", Bundle.class, null);
}
 
开发者ID:groupsky,项目名称:roboguice-events,代码行数:22,代码来源:ActivityEventsTest.java

示例2: onCreate

import roboguice.event.EventManager; //导入依赖的package包/类
@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));
}
 
开发者ID:AMOS-2015,项目名称:amos-ss15-proj2,代码行数:9,代码来源:AbstractRoboDrawerActivity.java

示例3: onCreate

import roboguice.event.EventManager; //导入依赖的package包/类
@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));
}
 
开发者ID:edx,项目名称:edx-app-android,代码行数:9,代码来源:RoboAppCompatActivity.java

示例4: onCreate

import roboguice.event.EventManager; //导入依赖的package包/类
@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(savedInstanceState));
}
 
开发者ID:huibinfeng0810,项目名称:github-v2,代码行数:9,代码来源:RoboSherlockAccountAuthenticatorActivity.java

示例5: onCreate

import roboguice.event.EventManager; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    final RoboInjector injector = RoboGuice.getInjector(this);
    eventManager = injector.getInstance(EventManager.class);
    preferenceListener = injector.getInstance(PreferenceListener.class);
    injector.injectMembersWithoutViews(this);
    super.onCreate(savedInstanceState);
    eventManager.fire(new OnCreateEvent(savedInstanceState));
}
 
开发者ID:huibinfeng0810,项目名称:github-v2,代码行数:10,代码来源:RoboSherlockPreferenceActivity.java

示例6: onCreate

import roboguice.event.EventManager; //导入依赖的package包/类
@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( savedInstanceState ) );
}
 
开发者ID:metova,项目名称:roboguice-appcompat,代码行数:10,代码来源:RoboActionBarActivity.java

示例7: obtainInjector

import roboguice.event.EventManager; //导入依赖的package包/类
public HoloInjector obtainInjector() {
    if (mInjector != null) {
        return mInjector;
    }
    WeakReference<HoloInjector> reference = sInjectorsMap.get(get());
    mInjector = reference == null ? null : reference.get();
    if (mInjector == null) {
        mInjector = createInjector(get());
        sInjectorsMap.put(get(), reference);
    }
    mEventManager = mInjector.getInstance(EventManager.class);
    return mInjector;
}
 
开发者ID:Prototik,项目名称:HoloEverywhere-Addon-Roboguice,代码行数:14,代码来源:AddonRoboguice.java

示例8: TestModule

import roboguice.event.EventManager; //导入依赖的package包/类
public TestModule(EventManager eventManager) {
	this.eventManager = eventManager;
}
 
开发者ID:groupsky,项目名称:roboguice-events,代码行数:4,代码来源:ActivityEventsTest.java

示例9: configure

import roboguice.event.EventManager; //导入依赖的package包/类
@Override
protected void configure() {
	bind(EventManager.class).toInstance(eventManager);
}
 
开发者ID:groupsky,项目名称:roboguice-events,代码行数:5,代码来源:ActivityEventsTest.java

示例10: getEventManager

import roboguice.event.EventManager; //导入依赖的package包/类
public EventManager getEventManager() {
    return mEventManager;
}
 
开发者ID:Prototik,项目名称:HoloEverywhere-Addon-Roboguice,代码行数:4,代码来源:AddonRoboguice.java


注:本文中的roboguice.event.EventManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。