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


Java IntoMap类代码示例

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


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

示例1: provideOnItemViewSelectedListener

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@PerFragment
@Provides
@IntoMap
@ListenerModuleKey(LiveDataFragment.class)
public OnItemViewSelectedListener provideOnItemViewSelectedListener(final Activity activity,
        final DisplayMetrics metrics, final BackgroundManager backgroundManager,
        final RequestOptions defaultPlaceHolder, final Drawable finalDrawable, final Handler mainHandler) {
    return new OnItemViewSelectedListener() {
        @Override
        public void onItemSelected(Presenter.ViewHolder itemViewHolder, Object item,
                RowPresenter.ViewHolder rowViewHolder, Row row) {
            VideoEntity selectedVideo = (VideoEntity) item;
            RunnableClass backgroundRunnable = new RunnableClass(selectedVideo, activity,
                    metrics, backgroundManager, defaultPlaceHolder, finalDrawable);

            if (lastTime != null) {
                mainHandler.removeCallbacks(lastTime);
            }
            mainHandler.postDelayed(backgroundRunnable, BACKGROUND_UPDATE_DELAY);
            lastTime = backgroundRunnable;
        }
    };
}
 
开发者ID:googlesamples,项目名称:leanback-showcase,代码行数:24,代码来源:ListenerModule.java

示例2:

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@PerActivity
@Binds
@IntoMap
@PrimitiveItemBinderKey(ColorNamePrimitive.class)
abstract GraywaterAdapter.ItemBinder<
		? extends Primitive,
		? extends PrimitiveViewHolder,
		? extends GraywaterAdapter.Binder<? extends Primitive, PrimitiveViewHolder, ? extends PrimitiveViewHolder>>
bindsColorNamePrimitiveItemBinder(ColorNamePrimitiveItemBinder colorNamePrimitiveItemBinder);
 
开发者ID:tumblr,项目名称:Graywater,代码行数:10,代码来源:ItemBinderModule.java

示例3: providesScalarInputDiscoverer

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@Provides
@IntoMap
@StringKey(ScalarInputSpec.TYPE)
public SensorDiscoverer providesScalarInputDiscoverer(Context context,
        UsageTracker usageTracker) {
    return new ScalarInputDiscoverer(new ScalarSensorServiceFinder(context), context,
            usageTracker);
}
 
开发者ID:google,项目名称:science-journal,代码行数:9,代码来源:ScalarInputDiscoveryModule.java

示例4: ingredientsContent

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@Provides
@IntoMap
@StringKey(INGREDIENTS_CONTENT)
@Reusable
public static FragmentLocation ingredientsContent(IngredientsFragmentComponentFactory component) {
    return new FragmentLocation.Builder<>(IngredientsFragment.class, INGREDIENTS_CONTENT)
            .setViewRootId(R.id.ingredients_content_frame)
            .setInjector(fragment -> fragment.setComponentFactory(component))
            .build();
}
 
开发者ID:st1hy,项目名称:Red-Calorie,代码行数:11,代码来源:IngredientsActivityModule.java

示例5: graphFragment

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@Provides
@IntoMap
@StringKey(GRAPH_CONTENT_TAG)
@Reusable
public static FragmentLocation graphFragment(GraphComponentFactory componentFactory) {
    return new FragmentLocation.Builder<>(GraphFragment.class, GRAPH_CONTENT_TAG)
            .setViewRootId(R.id.overview_content_root)
            .setInjector(fragment -> fragment.setComponentFactory(componentFactory))
            .build();
}
 
开发者ID:st1hy,项目名称:Red-Calorie,代码行数:11,代码来源:OverviewActivityModule.java

示例6: addIngredientFragment

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@Provides
@IntoMap
@StringKey(CONTENT_TAG)
@Reusable
public static FragmentLocation addIngredientFragment(AddIngredientFragmentComponentFactory componentFactory) {
    return new FragmentLocation.Builder<>(AddIngredientFragment.class, CONTENT_TAG)
            .setViewRootId(R.id.add_ingredient_content_frame)
            .setInjector(fragment -> fragment.setComponentFactory(componentFactory))
            .build();
}
 
开发者ID:st1hy,项目名称:Red-Calorie,代码行数:11,代码来源:AddIngredientModule.java

示例7: mealDetailFragmentLocation

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@Provides
@Reusable
@IntoMap
@StringKey(FRAGMENT_TAG)
public static FragmentLocation mealDetailFragmentLocation(MealDetailActivityComponent component) {
    return new FragmentLocation.Builder<>(MealDetailFragment.class, FRAGMENT_TAG)
            .setViewRootId(R.id.meal_detail_content_root)
            .setInjector(fragment -> fragment.setComponentFactory(component))
            .build();
}
 
开发者ID:st1hy,项目名称:Red-Calorie,代码行数:11,代码来源:MealDetailActivityModel.java

示例8: addMealContent

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@Provides
@IntoMap
@StringKey(ADD_MEAL_CONTENT)
@Reusable
public static FragmentLocation addMealContent(AddMealActivityComponent component) {
    return new FragmentLocation.Builder<>(AddMealFragment.class, ADD_MEAL_CONTENT)
            .setViewRootId(R.id.add_meal_content_frame)
            .setInjector(fragment -> fragment.setComponentFactory(component))
            .build();
}
 
开发者ID:st1hy,项目名称:Red-Calorie,代码行数:11,代码来源:AddMealActivityModule.java

示例9: settingsFragment

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@Provides
@IntoMap
@StringKey(SETTINGS_CONTENT_TAG)
@Reusable
public static FragmentLocation settingsFragment(SettingsFragmentComponentFactory factory) {
    return new FragmentLocation.Builder<>(SettingsFragment.class, SETTINGS_CONTENT_TAG)
            .setViewRootId(R.id.settings_content_root)
            .setInjector(fragment -> fragment.setComponentFactory(factory))
            .build();
}
 
开发者ID:st1hy,项目名称:Red-Calorie,代码行数:11,代码来源:SettingsActivityModule.java

示例10: ingredientDetailContent

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@Provides
@IntoMap
@StringKey(INGREDIENT_DETAIL_CONTENT)
@Reusable
public static FragmentLocation ingredientDetailContent(IngredientDetailComponent component) {
    return new FragmentLocation.Builder<>(IngredientDetailFragment.class, INGREDIENT_DETAIL_CONTENT)
            .setViewRootId(R.id.ingredient_detail_content)
            .setInjector(fragment -> fragment.setComponentFactory(component))
            .build();
}
 
开发者ID:st1hy,项目名称:Red-Calorie,代码行数:11,代码来源:IngredientDetailModule.java

示例11: tagsContent

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@Provides
@IntoMap
@StringKey(TAGS_CONTENT_TAG)
@Reusable
public static FragmentLocation tagsContent(TagsFragmentComponentFactory componentFactory) {
    return new FragmentLocation.Builder<>(TagsFragment.class, TAGS_CONTENT_TAG)
            .setViewRootId(R.id.tags_content_frame)
            .setInjector(fragment -> fragment.setComponentFactory(componentFactory))
            .build();
}
 
开发者ID:st1hy,项目名称:Red-Calorie,代码行数:11,代码来源:TagsActivityModule.java

示例12: intentHandlerClass

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@Provides
@IntoMap
@StringKey(PermissionFragment.TAG)
@Reusable
public static FragmentLocation intentHandlerClass() {
    return new FragmentLocation.Builder<>(PermissionFragment.class, PermissionFragment.TAG).build();
}
 
开发者ID:st1hy,项目名称:Red-Calorie,代码行数:8,代码来源:PermissionModule.java

示例13: provideChillPresenter

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@ActivityScope
@Provides
@IntoMap
@CLEnumKey(CodeLabData.CHILL)
public static CodeLabContract.Presenter provideChillPresenter(ChillPresenter chillPresenter) {
    return chillPresenter;
}
 
开发者ID:ragdroid,项目名称:rxify,代码行数:8,代码来源:ActivityModule.java

示例14: provideJustPresenter

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@ActivityScope
@Provides
@IntoMap
@CLEnumKey(CodeLabData.JUST)
public static CodeLabContract.Presenter provideJustPresenter(BaseSchedulerProvider provider) {
    return new JustPresenter(provider);
}
 
开发者ID:ragdroid,项目名称:rxify,代码行数:8,代码来源:ActivityModule.java

示例15: provideEmptyPresenter

import dagger.multibindings.IntoMap; //导入依赖的package包/类
@ActivityScope
@Provides
@IntoMap
@CLEnumKey(CodeLabData.EMPTY)
public static CodeLabContract.Presenter provideEmptyPresenter(BaseSchedulerProvider provider) {
    return new EmptyPresenter(provider);
}
 
开发者ID:ragdroid,项目名称:rxify,代码行数:8,代码来源:ActivityModule.java


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