Search in sources :

Example 1 with ProviderScope

use of butter.droid.provider.base.ProviderScope in project butter-android by butterproject.

the class ProviderModule method provideVodoWrapper.

@Provides
@ProviderScope
@ElementsIntoSet
Set<ProviderWrapper> provideVodoWrapper(final VodoProvider vodoProvider, final OpenSubsProvider openSubsProvider, final MockMediaProvider mockProvider, final MockSubsProvider mockSubsProvider) {
    Set<ProviderWrapper> set = new TreeSet<>((o1, o2) -> o2.getPosition() - o1.getPosition());
    set.add(new ProviderWrapper(vodoProvider, openSubsProvider, R.string.vodo_label, R.drawable.ic_nav_movies, 0));
    set.add(new ProviderWrapper(mockProvider, mockSubsProvider, butter.droid.provider.mock.R.string.title_movies, butter.droid.provider.mock.R.drawable.ic_nav_movies, 1));
    return set;
}
Also used : TreeSet(java.util.TreeSet) ProviderWrapper(butter.droid.base.manager.internal.provider.model.ProviderWrapper) ProviderScope(butter.droid.provider.base.ProviderScope) ElementsIntoSet(dagger.multibindings.ElementsIntoSet) Provides(dagger.Provides)

Aggregations

ProviderWrapper (butter.droid.base.manager.internal.provider.model.ProviderWrapper)1 ProviderScope (butter.droid.provider.base.ProviderScope)1 Provides (dagger.Provides)1 ElementsIntoSet (dagger.multibindings.ElementsIntoSet)1 TreeSet (java.util.TreeSet)1