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


Java GsonSpeaker类代码示例

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


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

示例1: onCreate

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
@Override
public void onCreate()
{
    super.onCreate();
    if (LeakCanary.isInAnalyzerProcess(this))
    {
        // This process is dedicated to LeakCanary for heap analysis.
        // You should not init your app in this process.
        return;
    }
    setupGraph();
    Iconify.with(new FontAwesomeModule());
    if (!BuildConfig.DEBUG)
        Bugsnag.init(this);
    else
        LeakCanary.install(this);

    // Empty string while RxSocialConnect's disk cache is not working
    RxSocialConnect.register(this, "")
            .using(new GsonSpeaker());
    NavigationDrawerBuilder.initialiseMaterialDrawerImageLoader();
}
 
开发者ID:jbmlaird,项目名称:DiscogsBrowser,代码行数:23,代码来源:App.java

示例2: provideRxCache

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
/**
 * 提供 {@link RxCache}
 *
 * @param cacheDirectory RxCache缓存路径
 * @return
 */
@Singleton
@Provides
RxCache provideRxCache(Application application, @Nullable RxCacheConfiguration configuration, @Named("RxCacheDirectory") File cacheDirectory) {
    RxCache.Builder builder = new RxCache.Builder();
    if (configuration != null)
        configuration.configRxCache(application, builder);
    return builder
            .persistence(cacheDirectory, new GsonSpeaker());
}
 
开发者ID:Superingxz,项目名称:MoligyMvpArms,代码行数:16,代码来源:ClientModule.java

示例3: provideRxCache

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
/**
 * 提供RXCache客户端
 *
 * @param cacheDirectory RxCache缓存路径
 * @return
 */
@Singleton
@Provides
RxCache provideRxCache(@Named("RxCacheDirectory") File cacheDirectory) {
    return new RxCache
            .Builder()
            .persistence(cacheDirectory, new GsonSpeaker());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:ClientModule.java

示例4: DiscogsInteractor

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
public DiscogsInteractor(Context context, Retrofit retrofit, MySchedulerProvider mySchedulerProvider, DiscogsScraper discogsScraper, SharedPrefsManager sharedPrefsManager)
{
    this.mySchedulerProvider = mySchedulerProvider;
    discogsService = retrofit.create(DiscogsService.class);
    this.discogsScraper = discogsScraper;

    cacheProviders = new RxCache.Builder()
            .setMaxMBPersistenceCache(5)
            .persistence(context.getFilesDir(), new GsonSpeaker())
            .using(CacheProviders.class);
    this.sharedPrefsManager = sharedPrefsManager;
}
 
开发者ID:jbmlaird,项目名称:DiscogsBrowser,代码行数:13,代码来源:DiscogsInteractor.java

示例5: AppModule

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
public AppModule(Application context)
{
    applicationContext = context;
    cacheProviders = new RxCache.Builder()
            .setMaxMBPersistenceCache(5)
            .persistence(context.getFilesDir(), new GsonSpeaker())
            .using(CacheProviders.class);
}
 
开发者ID:jbmlaird,项目名称:DiscogsBrowser,代码行数:9,代码来源:AppModule.java

示例6: provideRxCache

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
/**
 * 提供RXCache客户端
 *
 * @param cacheDir 缓存路径
 * @return
 */
@Singleton
@Provides
RxCache provideRxCache(File cacheDir) {
    return new RxCache
            .Builder()
            .persistence(cacheDir, new GsonSpeaker());
}
 
开发者ID:Zyj163,项目名称:yyox,代码行数:14,代码来源:ClientModule.java

示例7: Repertories

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
public Repertories(File cacheDir) {
    // create apis
    cacheApi = new RxCache.Builder()
            .useExpiredDataIfLoaderNotAvailable(true)
            .persistence(cacheDir, new GsonSpeaker())
            .using(CacheApi.class);

    remoteApi = new Retrofit.Builder()
            .baseUrl(URL_BASE)
            .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
            .addConverterFactory(GsonConverterFactory.create())
            .client(UnsafeOkHttpUtils.getClient())
            .build()
            .create(RemoteApi.class);

    // add types
    Context context = BaseApplication.getContext();
    types.add(context.getString(R.string.type_other));
    types.add(context.getString(R.string.type_web));
    types.add(context.getString(R.string.type_we_chat));
    types.add(context.getString(R.string.type_html5));
    types.add(context.getString(R.string.type_app));
    types.add(context.getString(R.string.type_intelligent_hardware));
    types.add(context.getString(R.string.type_desktop_app));
    types.add(context.getString(R.string.type_big_data));
    types.add(context.getString(R.string.type_system));
    types.add(context.getString(R.string.type_sdk_api));
    types.add(context.getString(R.string.type_art));
}
 
开发者ID:ittianyu,项目名称:POCenter,代码行数:30,代码来源:Repertories.java

示例8: provideRxCache

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
/**
 * 提供RXCache客户端
 *
 * @param cacheDirectory RxCache缓存路径
 * @return
 */
@Singleton
@Provides
RxCache provideRxCache(Application application, @Nullable RxCacheConfiguration configuration, @Named("RxCacheDirectory") File cacheDirectory) {
    RxCache.Builder builder = new RxCache.Builder();
    if (configuration != null)
        configuration.configRxCache(application, builder);
    return builder
            .persistence(cacheDirectory, new GsonSpeaker());
}
 
开发者ID:yangxp108,项目名称:MVPArms_Fragment-fragment,代码行数:16,代码来源:ClientModule.java

示例9: provideRxCache

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
/**
 * 提供 {@link RxCache}
 *
 * @param cacheDirectory RxCache缓存路径
 * @return
 */
@Singleton
@Provides
RxCache provideRxCache(Application application, @Nullable RxCacheConfiguration configuration, @Named("RxCacheDirectory") File cacheDirectory) {
    RxCache.Builder builder = new RxCache.Builder();
    RxCache rxCache = null;
    if (configuration != null) {
        rxCache = configuration.configRxCache(application, builder);
    }
    if (rxCache != null) return rxCache;
    return builder
            .persistence(cacheDirectory, new GsonSpeaker());
}
 
开发者ID:Zweihui,项目名称:Aurora,代码行数:19,代码来源:ClientModule.java

示例10: getUserCache

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
public synchronized static UserCacheProviders getUserCache() {
    if (userCacheProviders == null) {
        userCacheProviders = new RxCache.Builder()
                .persistence(BaseApplication.getApplication().getExternalCacheDir(), new GsonSpeaker())
                .using(UserCacheProviders.class);
    }
    return userCacheProviders;
}
 
开发者ID:qingmei2,项目名称:RxFamilyUsage-Android,代码行数:9,代码来源:CacheProviders.java

示例11: provideRxCache

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
/**
 * provide {@link RxCache}
 *
 * @param cacheDirectory RxCache cache path
 * @return RxCache
 */
@Singleton
@Provides
RxCache provideRxCache(@Nullable RxCacheConfiguration configuration, @Named("RxCacheDirectory") File cacheDirectory) {
    RxCache.Builder builder = new RxCache.Builder();
    RxCache rxCache = null;
    if (configuration != null) {
        rxCache = configuration.configRxCache(mApplication, builder);
    }
    if (rxCache != null) {
        return rxCache;
    }
    return builder.persistence(cacheDirectory, new GsonSpeaker());
}
 
开发者ID:goutham106,项目名称:GmArchMvvm,代码行数:20,代码来源:ClientModule.java

示例12: provideRxCache

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
/**
 * 提供RXCache客户端
 *
 * @param cacheDirectory RxCache缓存路径
 * @return
 */
@Singleton
@Provides
RxCache provideRxCache(Application application, RxCacheConfiguration configuration, @Named("RxCacheDirectory") File cacheDirectory) {
    RxCache.Builder builder = new RxCache.Builder();
    configuration.configRxCache(application, builder);
    return builder
            .persistence(cacheDirectory, new GsonSpeaker());
}
 
开发者ID:hshare,项目名称:MVPArmsTest1,代码行数:15,代码来源:ClientModule.java

示例13: provideRxCache

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
/**
 * 提供 {@link RxCache}
 *
 * @param cacheDirectory RxCache 缓存路径
 * @return RxCache
 */
@Singleton
@Provides
RxCache provideRxCache(@Nullable RxCacheConfiguration configuration, @Named("RxCacheDirectory") File cacheDirectory) {
    RxCache.Builder builder = new RxCache.Builder();
    RxCache rxCache = null;
    if (configuration != null) {
        rxCache = configuration.configRxCache(mApplication, builder);
    }
    if (rxCache != null) {
        return rxCache;
    }
    return builder.persistence(cacheDirectory, new GsonSpeaker());
}
 
开发者ID:xiaobailong24,项目名称:MVVMArms,代码行数:20,代码来源:ClientModule.java

示例14: provideRxCache

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
/**
 * 提供RxCache
 *
 * @param cacheDirectory RxCache缓存路径
 * @return
 */
@Singleton
@Provides
RxCache provideRxCache(Application application, @Nullable RxCacheConfiguration configuration, @Named("RxCacheDirectory") File cacheDirectory) {
    RxCache.Builder builder = new RxCache.Builder();
    if (configuration != null) {
        configuration.configRxCache(application, builder);
    }
    return builder
            .persistence(cacheDirectory, new GsonSpeaker());
}
 
开发者ID:RockyQu,项目名称:MVPFrames,代码行数:17,代码来源:HttpModule.java

示例15: mockApiForSuccess

import io.victoralbertos.jolyglot.GsonSpeaker; //导入依赖的package包/类
private void mockApiForSuccess() {
  NetworkResponse networkResponse = new NetworkResponse();

  GithubUsersApi githubUsersApi = new Mockery.Builder<ApiSuccess>()
      .mock(ApiSuccess.class)
      .build();

  ReactiveCache reactiveCache = new ReactiveCache.Builder()
      .using(testFolder.getRoot(), new GsonSpeaker());

  userRepositoryUT = new UserRepository(githubUsersApi,
      networkResponse, reactiveCache);
}
 
开发者ID:VictorAlbertos,项目名称:DirtyAndroid,代码行数:14,代码来源:UserRepositoryTest.java


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