// Path: client/FourFun/app/src/main/java/com/joker/fourfun/di/component/ActivityComponent.java
// @PerActivity
// @Component(dependencies = AppComponent.class, modules = ActivityModule.class)
// public interface ActivityComponent {
//     AppCompatActivity activity();
// 
//     void inject(SplashActivity activity);
// 
//     void inject(MainActivity activity);
// 
//     void inject(PictureDetailActivity activity);
// 
//     void inject(LoginActivity activity);
// 
//     void inject(RegisterActivity activity);
// 
//     void inject(MovieDetailActivity activity);
// }
// 
// Path: client/FourFun/app/src/main/java/com/joker/fourfun/di/component/AppComponent.java
// @Singleton
// @Component(modules = AppModule.class)
// public abstract class AppComponent {
//     private static AppComponent mComponent;
// 
//     public static AppComponent getInstance() {
//         if (mComponent == null) {
//             synchronized (AppComponent.class) {
//                 if (mComponent == null) {
//                     mComponent = DaggerAppComponent.builder().appModule(new AppModule(FourFun.getInstance
//                             ())).build();
//                 }
//             }
//         }
// 
//         return mComponent;
//     }
// 
//     public abstract FourFun fourFun();
// 
//     public abstract RetrofitUtil retrofitUtil();
// }
// 
// Path: client/FourFun/app/src/main/java/com/joker/fourfun/di/module/ActivityModule.java
// @Module
// public class ActivityModule {
//     private AppCompatActivity mActivity;
// 
//     public ActivityModule(AppCompatActivity appCompatActivity) {
//         mActivity = appCompatActivity;
//     }
// 
//     @Provides
//     @PerActivity
//     AppCompatActivity provideActivity() {
//         return mActivity;
//     }
// }


import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.joker.fourfun.di.component.ActivityComponent;
import com.joker.fourfun.di.component.AppComponent;
import com.joker.fourfun.di.component.DaggerActivityComponent;
import com.joker.fourfun.di.module.ActivityModule;
import javax.inject.Inject;
import butterknife.ButterKnife;
package com.joker.fourfun.base;





public abstract class BaseMvpActivity<V extends BaseView, T extends BaseMvpPresenter<V>> extends
        AppCompatActivity {
    @Inject
    protected T mPresenter;

    @Override
    @SuppressWarnings("unchecked")
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        setContentViewAndInject(savedInstanceState);
        ButterKnife.bind(this);
//        mPresenter = initPresenter();
        mPresenter.attach((V) this);
    }

    protected ActivityComponent getComponent() {
// Path: client/FourFun/app/src/main/java/com/joker/fourfun/di/component/ActivityComponent.java
// @PerActivity
// @Component(dependencies = AppComponent.class, modules = ActivityModule.class)
// public interface ActivityComponent {
//     AppCompatActivity activity();
// 
//     void inject(SplashActivity activity);
// 
//     void inject(MainActivity activity);
// 
//     void inject(PictureDetailActivity activity);
// 
//     void inject(LoginActivity activity);
// 
//     void inject(RegisterActivity activity);
// 
//     void inject(MovieDetailActivity activity);
// }
// 
// Path: client/FourFun/app/src/main/java/com/joker/fourfun/di/component/AppComponent.java
// @Singleton
// @Component(modules = AppModule.class)
// public abstract class AppComponent {
//     private static AppComponent mComponent;
// 
//     public static AppComponent getInstance() {
//         if (mComponent == null) {
//             synchronized (AppComponent.class) {
//                 if (mComponent == null) {
//                     mComponent = DaggerAppComponent.builder().appModule(new AppModule(FourFun.getInstance
//                             ())).build();
//                 }
//             }
//         }
// 
//         return mComponent;
//     }
// 
//     public abstract FourFun fourFun();
// 
//     public abstract RetrofitUtil retrofitUtil();
// }
// 
// Path: client/FourFun/app/src/main/java/com/joker/fourfun/di/module/ActivityModule.java
// @Module
// public class ActivityModule {
//     private AppCompatActivity mActivity;
// 
//     public ActivityModule(AppCompatActivity appCompatActivity) {
//         mActivity = appCompatActivity;
//     }
// 
//     @Provides
//     @PerActivity
//     AppCompatActivity provideActivity() {
//         return mActivity;
//     }
// }


// Path: client/FourFun/app/src/main/java/com/joker/fourfun/base/BaseMvpActivity.java
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.joker.fourfun.di.component.ActivityComponent;
import com.joker.fourfun.di.component.AppComponent;
import com.joker.fourfun.di.component.DaggerActivityComponent;
import com.joker.fourfun.di.module.ActivityModule;
import javax.inject.Inject;
import butterknife.ButterKnife;

package com.joker.fourfun.base;





public abstract class BaseMvpActivity<V extends BaseView, T extends BaseMvpPresenter<V>> extends
        AppCompatActivity {
    @Inject
    protected T mPresenter;

    @Override
    @SuppressWarnings("unchecked")
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        setContentViewAndInject(savedInstanceState);
        ButterKnife.bind(this);
//        mPresenter = initPresenter();
        mPresenter.attach((V) this);
    }

    protected ActivityComponent getComponent() {
        return DaggerActivityComponent.builder().activityModule(getModule()).appComponent(AppComponent