本文整理汇总了Java中com.jess.arms.di.module.AppModule类的典型用法代码示例。如果您正苦于以下问题:Java AppModule类的具体用法?Java AppModule怎么用?Java AppModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AppModule类属于com.jess.arms.di.module包,在下文中一共展示了AppModule类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.jess.arms.di.module.AppModule; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mApplication = this;
this.mAppModule = new AppModule(this);//提供application
DaggerBaseComponent
.builder()
.appModule(mAppModule)
.build()
.inject(this);
this.mImagerModule = new ImageModule();//图片加载框架默认使用glide
this.mClientModule = new ClientModule(mAppManager);//用于提供okhttp和retrofit的单例
this.mGlobeConfigModule = checkNotNull(getGlobeConfigModule(), "lobeConfigModule is required");
registerActivityLifecycleCallbacks(mActivityLifecycle);
}
示例2: onCreate
import com.jess.arms.di.module.AppModule; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mApplication = this;
this.mAppModule = new AppModule(this);//提供application
DaggerBaseComponent
.builder()
.appModule(mAppModule)
.build()
.inject(this);
this.mImagerModule = new ImageModule();//图片加载框架默认使用glide
this.mClientModule = new ClientModule(mAppManager);//用于提供okhttp和retrofit的单例
this.mGlobeConfigModule = checkNotNull(getGlobeConfigModule(), "lobeConfigModule is required");
}
示例3: DaggerRule
import com.jess.arms.di.module.AppModule; //导入依赖的package包/类
public DaggerRule() {
super(AppComponent.class,new AppModule(RuntimeEnvironment.application)
,new ClientModule(), new GlobalConfiguration());
set(new ComponentSetter<AppComponent>() {
@Override
public void setComponent(AppComponent component) {
}
});
}
示例4: onCreate
import com.jess.arms.di.module.AppModule; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mApplication = this;
this.mAppModule = new AppModule(this);//提供application
DaggerAppComponent
.builder()
.appModule(mAppModule)
.build()
.inject(this); //provide Application gson
this.mImagerModule = new ImageModule();//使用策略模式 图片加载框架默认使用glide
this.mClientModule = new ClientModule(mAppManager);//用于提供okhttp和retrofit的单例
this.mGlobeConfigModule = checkNotNull(getGlobeConfigModule(), "lobeConfigModule is required");
registerActivityLifecycleCallbacks(mActivityLifecycle);
}
示例5: getAppModule
import com.jess.arms.di.module.AppModule; //导入依赖的package包/类
public AppModule getAppModule() {
return mAppModule;
}
示例6: getAppModule
import com.jess.arms.di.module.AppModule; //导入依赖的package包/类
/**
* 返回创建的AppModule
*
* @return AppModule
*/
public AppModule getAppModule() {
return mAppModule;
}