Question

I learned how to create Application-scoped ObjectGraph, and @Inject into my Views from it.

Then I learned how to create Activity-scoped ObjectGraph, and @Inject into my View's from an Activity's Context.

Now I need to learn how to create a Fragment-scoped ObjectGraph, since Fragment is not a Context and is not injected into my Views by the LayoutInflater.

As I see the problem: I need a way to reference a Fragment from inside a View, but I think this is essentially wrong, and I need another solution

Was it helpful?

Solution

I ended up using Mortar for that https://github.com/square/mortar

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top