本文整理汇总了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;
}
};
}
示例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);
示例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);
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例13: provideChillPresenter
import dagger.multibindings.IntoMap; //导入依赖的package包/类
@ActivityScope
@Provides
@IntoMap
@CLEnumKey(CodeLabData.CHILL)
public static CodeLabContract.Presenter provideChillPresenter(ChillPresenter chillPresenter) {
return chillPresenter;
}
示例14: provideJustPresenter
import dagger.multibindings.IntoMap; //导入依赖的package包/类
@ActivityScope
@Provides
@IntoMap
@CLEnumKey(CodeLabData.JUST)
public static CodeLabContract.Presenter provideJustPresenter(BaseSchedulerProvider provider) {
return new JustPresenter(provider);
}
示例15: provideEmptyPresenter
import dagger.multibindings.IntoMap; //导入依赖的package包/类
@ActivityScope
@Provides
@IntoMap
@CLEnumKey(CodeLabData.EMPTY)
public static CodeLabContract.Presenter provideEmptyPresenter(BaseSchedulerProvider provider) {
return new EmptyPresenter(provider);
}