blakelee
12/23/2020, 1:40 AMclass MyClass @Inject constructor(
@Tablet isTablet: Boolean
)
Then in my module I have something like
@Provides
@Tablet
fun provideIsTablet(context: Context): Boolean = someWayToTellIfTablet
Is there a way to create an annotation like this without have to use @Named("Tablet")
Nicholas Doglio
12/23/2020, 1:55 AM@Qualifier
.
@Qualifier
annotation class Tablet
Create this class with the annotation and your snippets will work as is.blakelee
12/23/2020, 1:59 AMColton Idle
12/23/2020, 2:48 AMjw
12/23/2020, 1:25 PMColton Idle
12/23/2020, 1:35 PM