title: Dagger 2: inject after define subcomponent
body: <p>I follow this <a href="https://google.github.io/dagger/subcomponents.html" rel="nofollow noreferrer">guide</a> for making sub components for my Android application. Here I defined one sub component named <code>LoginComponent</code> used for LoginActivity:</p>
  
  <pre><code>@Subcomponent(modules = LoginModule.class)
  public interface LoginComponent {
  
      void inject(LoginActivity activity);
  
      @Subcomponent.Builder
      interface Builder {
          Builder requestModule(LoginModule module);
          LoginComponent build();
      }
  }
  
  
  @Module
  public class LoginModule {
      @Provides
      LoginManager provideLoginManager(LoginManagerImpl manager) {
          return manager;
      }
  
      @Provides
      LoginView provideLoginView(LoginViewImpl view) {
          return view;
      }
  
      @Provides
      LoginPresenter loginPresenter(LoginView view, LoginManager manager) {
          return new LoginPresenterImpl(view, manager);
      }
  }
  </code></pre>
  
  <p>I define this sub component inside another component:</p>
  
  <pre><code>@Module(subcomponents = LoginComponent.class)
  public interface AppModule {
  }
  
  @Singleton
  @Component(modules = {
          AppModule.class
  })
  public interface AppComponent {
  }
  </code></pre>
  
  <p>Here is my LoginActivity:</p>
  
  <pre><code>public class LoginActivity extends AppCompatActivity  {
  
      @Inject LoginPresenter presenter;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_login);
      }
  }
  </code></pre>
  
  <p>My question is:</p>
  
  <ol>
  <li>purpose of <code>@Subcomponent.Builder</code>. I don't understand this point, because all modules in this component has been defined on <code>@Subcomponent</code> annotation. Why should we duplicate again.</li>
  <li>how can I injected LoginPresenter on above activity.</li>
  </ol>
  
  <p>Thanks</p>