title: What is the best way to implement onClick inside an Epoxy Controller when using Dagger
body: <p>I am trying to implement Click functionality on an item inside a <code>RecyclerView</code> using airbnb.epoxy.
  The problem is that i need context in order to navigate to another activity upon click.</p>
  <p><strong>What i have done:</strong>
  Following Epoxy's sample app I implemented an interface inside the EpoxyController that contains the function to be called when clicking an item in the recycler view.
  I then make my main activity implement this interface and method, and instantiate the controller using its constructor inside the main activity and passing it a reference to the activity:</p>
  <pre><code>    public class MortgageController extends TypedEpoxyController&lt;List&lt;Mortgage&gt;&gt; {
  
      private final MortgageCallBacks callBacks;
  
      public MortgageController(MortgageCallBacks callBacks) {
          this.callBacks = callBacks;
      }
  
      @Override
      protected void buildModels(List&lt;Mortgage&gt; mortgages) {
          Observable.from(mortgages)
                  .subscribe(mortgage -&gt; new MortgageModel_().id(mortgage.id())
                          .mortgage(mortgage)
                          .clicks(callBacks::onMortgageClicked)
                          .addTo(this));
      }
  
  
      public interface MortgageCallBacks {
          void onMortgageClicked(Mortgage mortgage);
      }
  }
  </code></pre>
  <p>main activity's onCreate and <code>onMortgageClick</code>:</p>
  <pre><code> @Override
   protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
  
       controller = new MortgageController(this);
       initRecycler();
       controller.setData(mortgages);}
   
   @Override
   public void onMortgageClicked(Mortgage mortgage) {
       DetailActivity.start(this, mortgage);
   }
  </code></pre>
  <p><strong>what i want to do</strong>
  while the above work, i am using <code>Dagger2</code> in my project and would like to inject the controller into the <code>MainActivity</code>, injecting it is not the problem rather supplying the activity context, after a little bit of research i found epoxy allow activity injection, so i thought i could inject the main activity to the controller, but i am not sure this is the best way to go, and couldn't find example projects that implement this.</p>
  <p>please enlighten me in what is the best way to do this</p>