AndroidAPS/app/src/main/java/info/nightscout/androidaps/dependencyInjection/SkinsModule.kt

37 lines
944 B
Kotlin
Raw Normal View History

2020-05-03 15:04:08 +02:00
package info.nightscout.androidaps.dependencyInjection
import dagger.Binds
import dagger.Module
import dagger.Provides
import dagger.multibindings.IntKey
import dagger.multibindings.IntoMap
import info.nightscout.androidaps.skins.SkinButtonsOn
import info.nightscout.androidaps.skins.SkinClassic
import info.nightscout.androidaps.skins.SkinInterface
2020-05-31 12:02:42 +02:00
import info.nightscout.androidaps.skins.SkinLargeDisplay
2020-05-03 15:04:08 +02:00
import javax.inject.Qualifier
@Module
open class SkinsModule {
@Provides
@Skin
@IntoMap
@IntKey(0)
fun bindsSkinClassic(skinClassic: SkinClassic): SkinInterface = skinClassic
@Provides
@Skin
@IntoMap
@IntKey(10)
fun bindsSkinButtonsOn(skinButtonsOn: SkinButtonsOn): SkinInterface = skinButtonsOn
2020-05-31 12:02:42 +02:00
@Provides
@Skin
@IntoMap
@IntKey(20)
fun bindsSkinLargeDisplay(skinLargeDisplay: SkinLargeDisplay): SkinInterface = skinLargeDisplay
2020-05-03 15:04:08 +02:00
@Qualifier
annotation class Skin
}