title: Why Dagger2 inject the same object but with 2 different instances?
body: <p><code>ArticlesContract.Presenter</code> is a new instance in <code>Adapter</code>, which is different with <code>ArticleListFragment</code>, so my data was lost ! I have no idea why I got two different instances:</p>
  
  <pre><code>@Module
  public class ArticleListFragmentModule {
      @Provides
      ArticlesContract.Presenter provideArticlesPresenter(ArticlesPresenter presenter) {
          return presenter;
      }
  }
  
  public class ArticleListFragment extends DaggerFragment implements ArticlesContract.View {
      @Inject
      ArticlesContract.Presenter mPresenter; //one instance
  }
  
  
  public class ArticlesAdapter extends RecyclerView.Adapter&lt;ArticleViewHolder&gt; {
      @Inject
      ArticlesContract.Presenter mPresenter; //another different instance
  }
  </code></pre>
  
  <h2>2018-05-16 UPDATED: this issues is fixed by following @Fred answer : lack a scope and managing this scope:</h2>
  
  <pre><code>@Scope
  @Documented
  @Retention(RetentionPolicy.RUNTIME)
  public @interface ArticlesScope {
  }
  
  @Module
  public abstract class ActivityBuilder {
      @ContributesAndroidInjector(modules = ArticleListFragmentModule.class)
      @ArticleListScope
      abstract ArticleListFragment bindArticleListFragment();
  }
  
  @Module
  public class ArticleListFragmentModule {
      /**
       * Provide dependency for interface.
       * Interface cannot be annotated with @Inject, otherwise it will cause, error: ArticlesContract.Presenter cannot be provided without an @Provides- or @Produces-annotated method.
       */
      @Provides
      @ArticleListScope
      ArticlesContract.Presenter provideArticlesPresenter(ArticlesPresenter presenter) {
          return presenter;
      }
  }
  </code></pre>
  
  <p>Scoping with @ContributesAndroidInjector, refer to <a href="https://proandroiddev.com/dagger-2-annotations-binds-contributesandroidinjector-a09e6a57758f" rel="nofollow noreferrer">Dagger 2 Annotations: @Binds &amp; @ContributesAndroidInjector</a></p>