// Path: app/src/main/java/com/mj/weather/weather/activity/LoginActivity.java
// public class LoginActivity extends BaseActivity {
//     private static final String TAG = "LoginActivity";
// 
//     @Inject
//     LoginPresenter loginPresenter;
// 
// 
//     public static void actionStart(Activity act) {
//         Intent intent = new Intent(act, LoginActivity.class);
//         act.startActivity(intent);
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_login);
// 
//         //Toolbar
//         Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
//         setSupportActionBar(toolbar);
//         ActionBar actionBar = getSupportActionBar();
//         if (actionBar != null) {
//             actionBar.setTitle("登录");
//             actionBar.setDisplayHomeAsUpEnabled(true);
//             actionBar.setDisplayShowHomeEnabled(true);
//         }
// 
//         //加载view
//         LoginFragment loginFragment = (LoginFragment) getSupportFragmentManager().findFragmentById(R.id.loginFrame);
//         if (loginFragment == null) {
//             loginFragment = LoginFragment.newInstance();
//             ActivityUtils.addFragmentToActivity(getSupportFragmentManager(), loginFragment, R.id.loginFrame);
//         }
// 
//         //dagger build
//         DaggerLoginComponent.builder()
//                 .loginViewModule(new LoginViewModule(loginFragment))
//                 .userRepositoryComponent(WeatherApplicationLike.getInstance().getUserRepositoryComponent())
//                 .build()
//                 .inject(this);
// 
//     }
// 
//     //后退
//     @Override
//     public boolean onSupportNavigateUp() {
//         onBackPressed();
//         return true;
//     }
// }
// 
// Path: app/src/main/java/com/mj/weather/weather/module/LoginViewModule.java
// @Module
// public class LoginViewModule {
// 
//     private LoginContract.View mView;
// 
//     public LoginViewModule(LoginContract.View mView) {
//         this.mView = mView;
//     }
// 
//     @Provides
//     LoginContract.View provideLoginContractView() {
//         return mView;
//     }
// 
// }


import com.mj.weather.weather.activity.LoginActivity;
import com.mj.weather.weather.module.LoginViewModule;
import com.mj.weather.common.annotation.PerActivity;
import dagger.Component;
package com.mj.weather.weather.component;



/**
 * Created by MengJie on 2017/6/21.
 */
@PerActivity
@Component(dependencies = UserRepositoryComponent.class, modules = LoginViewModule.class)
// Path: app/src/main/java/com/mj/weather/weather/activity/LoginActivity.java
// public class LoginActivity extends BaseActivity {
//     private static final String TAG = "LoginActivity";
// 
//     @Inject
//     LoginPresenter loginPresenter;
// 
// 
//     public static void actionStart(Activity act) {
//         Intent intent = new Intent(act, LoginActivity.class);
//         act.startActivity(intent);
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_login);
// 
//         //Toolbar
//         Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
//         setSupportActionBar(toolbar);
//         ActionBar actionBar = getSupportActionBar();
//         if (actionBar != null) {
//             actionBar.setTitle("登录");
//             actionBar.setDisplayHomeAsUpEnabled(true);
//             actionBar.setDisplayShowHomeEnabled(true);
//         }
// 
//         //加载view
//         LoginFragment loginFragment = (LoginFragment) getSupportFragmentManager().findFragmentById(R.id.loginFrame);
//         if (loginFragment == null) {
//             loginFragment = LoginFragment.newInstance();
//             ActivityUtils.addFragmentToActivity(getSupportFragmentManager(), loginFragment, R.id.loginFrame);
//         }
// 
//         //dagger build
//         DaggerLoginComponent.builder()
//                 .loginViewModule(new LoginViewModule(loginFragment))
//                 .userRepositoryComponent(WeatherApplicationLike.getInstance().getUserRepositoryComponent())
//                 .build()
//                 .inject(this);
// 
//     }
// 
//     //后退
//     @Override
//     public boolean onSupportNavigateUp() {
//         onBackPressed();
//         return true;
//     }
// }
// 
// Path: app/src/main/java/com/mj/weather/weather/module/LoginViewModule.java
// @Module
// public class LoginViewModule {
// 
//     private LoginContract.View mView;
// 
//     public LoginViewModule(LoginContract.View mView) {
//         this.mView = mView;
//     }
// 
//     @Provides
//     LoginContract.View provideLoginContractView() {
//         return mView;
//     }
// 
// }


// Path: app/src/main/java/com/mj/weather/weather/component/LoginComponent.java
import com.mj.weather.weather.activity.LoginActivity;
import com.mj.weather.weather.module.LoginViewModule;
import com.mj.weather.common.annotation.PerActivity;
import dagger.Component;

package com.mj.weather.weather.component;



/**
 * Created by MengJie on 2017/6/21.
 */
@PerActivity
@Component(dependencies = UserRepositoryComponent.class, modules = LoginViewModule.class)
public interface LoginComponent {