title: Trying to implement MVP using Dagger 2 - How can I get a reference to the Activity in the provided presenter
body: <p>I am trying to set up an app with MVP and Dagger,</p>
  
  <p>The <strong>view</strong> is an <code>Activity</code> which implements a view interface.</p>
  
  <pre><code>public class OverviewActivity extends AppCompatActivity implements OverviewContract.View {
  
      @Inject OverviewPresenter presenter;
  
      @BindView(R.id.history_days) ListView HistoryLabels;
      @BindView(R.id.history_events) ListView HistoryEvents;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_overview);
          ButterKnife.bind(this);
  
          DaggerOverviewComponent.create().inject(this);
  
      }
  
      @Override
      public void showHistory(List&lt;Exercise&gt; history) {
        // ...
      }
  
      @Override
      public void updateScoreSlider(float value) {
        // ...
      }
  
      @OnClick(R.id.add_event_button)
      public void addEvent(View v){
        // ...
      }
  }
  </code></pre>
  
  <p>The <strong>presenter</strong> looks like so</p>
  
  <pre><code>public class OverviewPresenter implements OverviewContract.Events {
  
      OverviewContract.View view;
  
      public OverviewPresenter( OverviewContract.View overviewView ) {
          view = overviewView;
  
      }
  
      @Override
      public void loadHistory() {
          // TODO
      }
  
      @Override
      public void addNewEvent() {
          // TODO
      }
  }
  </code></pre>
  
  <p>Where I am having trouble is with the <strong>provider</strong> for the presenter. One of the dependencies of <code>OverviewPresenter</code> is the <code>OverviewActivity</code>, but how am I supposed to inject the instance of <code>OverviewActivity</code> into the <code>OverviewPresenter</code> ?</p>
  
  <pre><code>@Module
  public class PresenterModule {
  
      @Provides
      static OverviewPresenter provideOverviewPresenter(){
          return new OverviewPresenter(/* pass in the instance of the activity here?? */);
      }
  }
  </code></pre>
  
  <p>My <strong>component</strong> looks like </p>
  
  <pre><code>@Component(modules = {PresenterModule.class})
  public interface OverviewComponent {
  
      void inject(OverviewActivity overviewActivity);
  }
  </code></pre>
  
  <p>Forgive me if this is way off base, I am still trying to wrap my head around dagger. </p>
  
  <p>TLDR:<br>
  How can I set this up so that my OverviewActivity can be injected with an OverviewPresenter which itself is injected with the instance of OverviewActivity?</p>