Java Code Examples for com.jess.arms.di.module.GlobalConfigModule#builder()

The following examples show how to use com.jess.arms.di.module.GlobalConfigModule#builder() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AppDelegate.java    From Aurora with Apache License 2.0 5 votes vote down vote up
/**
 * 将app的全局配置信息封装进module(使用Dagger注入到需要配置信息的地方)
 * 需要在AndroidManifest中声明{@link ConfigModule}的实现类,和Glide的配置方式相似
 *
 * @return
 */
private GlobalConfigModule getGlobalConfigModule(Context context, List<ConfigModule> modules) {

    GlobalConfigModule.Builder builder = GlobalConfigModule
            .builder();

    //遍历 ConfigModule 集合, 给全局配置 GlobalConfigModule 添加参数
    for (ConfigModule module : modules) {
        module.applyOptions(context, builder);
    }

    return builder.build();
}
 
Example 2
Source File: AppDelegate.java    From MVPArms with Apache License 2.0 5 votes vote down vote up
/**
 * 将app的全局配置信息封装进module(使用Dagger注入到需要配置信息的地方)
 * 需要在AndroidManifest中声明{@link ConfigModule}的实现类,和Glide的配置方式相似
 *
 * @return GlobalConfigModule
 */
private GlobalConfigModule getGlobalConfigModule(Context context, List<ConfigModule> modules) {
    GlobalConfigModule.Builder builder = GlobalConfigModule
            .builder();

    //遍历 ConfigModule 集合, 给全局配置 GlobalConfigModule 添加参数
    for (ConfigModule module : modules) {
        module.applyOptions(context, builder);
    }

    return builder.build();
}