Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Adding flavor dependent features on a shared screen can be troublesome. The problem gets even worse when you don't want to couple app flavors to features they don't use. In this article I'll show you how we do in FootballCo using Dagger 2 Multibinding, AdapterDelegates and some abstractions.
Dagger2 Multibindings add even more complexity to the dependency injection in Android, but they can be used to solve even more complex problems. The example project for this article is available on GitHub, I hope it can be used as learning material for using Dagger 2 Multibindings in Android apps with multiple flavors.
Related posts
- New to professional Android development. Are there any commonly used templates or resources I might be missing?
- Productivity tip 'Live Templates'
- Is there any easier way to use RecyclerViews?
- Single Adapter 'Pattern'?
- I made a recycler adapter for mvvm with the boilerplate removed. (no more viewholder classes)