// Path: dagger_app/src/main/java/my/liewjuntung/daggerviperusage/view/InitActivity.java
// public class InitActivity extends AppCompatActivity implements InitView {
//     private static final String TAG = InitActivity.class.getSimpleName();
//     @Inject
//     public InitPresenter<RequestModel> presenter;
//     // not really necessary to inject so many, just to demonstrate that it can be done like this.
//     // Just for lulz
//     @Inject
//     public InitViewAdapter adapter;
//     @Inject
//     public LinearLayoutManager layoutManager;
//     @Inject @Named("kevin")
//     public RequestModel model;
// 
// 
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         /* Inject this activity, the inject fields are initialized in this point */
//         AndroidInjection.inject(this);
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_init);
//         // put AndroidInjection.inject(this); here if you want to inject ActivityInitBinding too.
//         ActivityInitBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_init);
//         presenter.onCreate();
// 
//         binding.initRecyclerview.setAdapter(adapter);
//         binding.initRecyclerview.setLayoutManager(layoutManager);
// 
//         presenter.onUpdateStart(model);
//     }
// 
//     @Override
//     protected void onResume() {
//         super.onResume();
//         presenter.onResume();
//     }
// 
//     @Override
//     protected void onPause() {
//         super.onPause();
//         presenter.onPause();
//     }
// 
//     @Override
//     protected void onDestroy() {
//         presenter.onDestroy();
//         presenter = null;
//         super.onDestroy();
//     }
// 
//     @Override
//     public void onUpdate(List<InstagramItemModel> result) {
//         Log.w(TAG, "onUpdate, list size : " + result.size());
//         adapter.setModelList(result);
//     }
// }
// 
// Path: dagger_app/src/main/java/my/liewjuntung/daggerviperusage/view/InitModule.java
// @Module
// public class InitModule {
//     @Provides
//     public InitView providesInitActivity(InitActivity initActivity){
//         return initActivity;
//     }
// 
//     @Provides
//     public InitInteractor providesInitInteractor(IServices iServices){
//         return new InitInteractorImp(iServices);
//     }
// 
//     @Provides
//     public InitPresenter<RequestModel> providesInitPresenter(InitView initView, InitInteractor initInteractor){
//         return new InitPresenterImp(initView, initInteractor);
//     }
// 
//     @Provides
//     public InitViewAdapter providesInitViewAdapter(){
//         return new InitViewAdapter();
//     }
// 
//     @Provides
//     public LinearLayoutManager providesLinearLayoutManager(InitActivity activity){
//         return new LinearLayoutManager(activity);
//     }
// 
//     @Provides
//     @Named("toru")
//     public RequestModel providesToruRequestModel(){
//         RequestModel model = new RequestModel();
//         model.id = "toru_0239";
//         model.maxId = "0";
//         return model;
//     }
// 
//     @Provides
//     @Named("kevin")
//     public RequestModel providesJTRequestModel(){
//         RequestModel model = new RequestModel();
//         model.id = "s1lv3rd3m0n";
//         model.maxId = "0";
//         return model;
//     }
// 
//     @Provides
//     public ActivityInitBinding providesActivityBinding(InitActivity activity){
//         return DataBindingUtil.setContentView(activity, R.layout.activity_init);
//     }
// }


import dagger.Module;
import dagger.android.ContributesAndroidInjector;
import my.liewjuntung.daggerviperusage.view.InitActivity;
import my.liewjuntung.daggerviperusage.view.InitModule;
package my.liewjuntung.daggerviperusage.dagger;


/**
 * Created by pandawarrior on 24/10/2017.
 */
@Module
public abstract class ActivityBuilder {
    @ContributesAndroidInjector(modules = {InitModule.class})
// Path: dagger_app/src/main/java/my/liewjuntung/daggerviperusage/view/InitActivity.java
// public class InitActivity extends AppCompatActivity implements InitView {
//     private static final String TAG = InitActivity.class.getSimpleName();
//     @Inject
//     public InitPresenter<RequestModel> presenter;
//     // not really necessary to inject so many, just to demonstrate that it can be done like this.
//     // Just for lulz
//     @Inject
//     public InitViewAdapter adapter;
//     @Inject
//     public LinearLayoutManager layoutManager;
//     @Inject @Named("kevin")
//     public RequestModel model;
// 
// 
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         /* Inject this activity, the inject fields are initialized in this point */
//         AndroidInjection.inject(this);
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_init);
//         // put AndroidInjection.inject(this); here if you want to inject ActivityInitBinding too.
//         ActivityInitBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_init);
//         presenter.onCreate();
// 
//         binding.initRecyclerview.setAdapter(adapter);
//         binding.initRecyclerview.setLayoutManager(layoutManager);
// 
//         presenter.onUpdateStart(model);
//     }
// 
//     @Override
//     protected void onResume() {
//         super.onResume();
//         presenter.onResume();
//     }
// 
//     @Override
//     protected void onPause() {
//         super.onPause();
//         presenter.onPause();
//     }
// 
//     @Override
//     protected void onDestroy() {
//         presenter.onDestroy();
//         presenter = null;
//         super.onDestroy();
//     }
// 
//     @Override
//     public void onUpdate(List<InstagramItemModel> result) {
//         Log.w(TAG, "onUpdate, list size : " + result.size());
//         adapter.setModelList(result);
//     }
// }
// 
// Path: dagger_app/src/main/java/my/liewjuntung/daggerviperusage/view/InitModule.java
// @Module
// public class InitModule {
//     @Provides
//     public InitView providesInitActivity(InitActivity initActivity){
//         return initActivity;
//     }
// 
//     @Provides
//     public InitInteractor providesInitInteractor(IServices iServices){
//         return new InitInteractorImp(iServices);
//     }
// 
//     @Provides
//     public InitPresenter<RequestModel> providesInitPresenter(InitView initView, InitInteractor initInteractor){
//         return new InitPresenterImp(initView, initInteractor);
//     }
// 
//     @Provides
//     public InitViewAdapter providesInitViewAdapter(){
//         return new InitViewAdapter();
//     }
// 
//     @Provides
//     public LinearLayoutManager providesLinearLayoutManager(InitActivity activity){
//         return new LinearLayoutManager(activity);
//     }
// 
//     @Provides
//     @Named("toru")
//     public RequestModel providesToruRequestModel(){
//         RequestModel model = new RequestModel();
//         model.id = "toru_0239";
//         model.maxId = "0";
//         return model;
//     }
// 
//     @Provides
//     @Named("kevin")
//     public RequestModel providesJTRequestModel(){
//         RequestModel model = new RequestModel();
//         model.id = "s1lv3rd3m0n";
//         model.maxId = "0";
//         return model;
//     }
// 
//     @Provides
//     public ActivityInitBinding providesActivityBinding(InitActivity activity){
//         return DataBindingUtil.setContentView(activity, R.layout.activity_init);
//     }
// }


// Path: dagger_app/src/main/java/my/liewjuntung/daggerviperusage/dagger/ActivityBuilder.java
import dagger.Module;
import dagger.android.ContributesAndroidInjector;
import my.liewjuntung.daggerviperusage.view.InitActivity;
import my.liewjuntung.daggerviperusage.view.InitModule;

package my.liewjuntung.daggerviperusage.dagger;


/**
 * Created by pandawarrior on 24/10/2017.
 */
@Module
public abstract class ActivityBuilder {
    @ContributesAndroidInjector(modules = {InitModule.class})
    public abstract InitActivity bindInitActivity();