// Path: app/src/main/java/com/newegg/tr/dagger2prac/model/action/ActionType.java
// public enum ActionType {
//     HELLO, BYE, FIBONACCI
// }
// 
// Path: app/src/main/java/com/newegg/tr/dagger2prac/presenter/MainPresenter.java
// public interface MainPresenter {
// 
//     public void onActionSelected(ActionType type);
// 
//     public void calcFib(int fibNumber);
// 
//     public void updateUser();
// }
// 
// Path: app/src/main/java/com/newegg/tr/dagger2prac/view/MainPageView.java
// public interface MainPageView {
// 
//     public void showActionResultText(String resultText);
// 
//     public void showInputMethodView(boolean isShow);
// 
//     public void showLoading();
// 
//     public void hideLoading();
// 
//     public void onActionError();
// }
// 
// Path: app/src/debug/java/com/newegg/tr/dagger2prac/view/component/MainComponent.java
// @Singleton
// @Component(
//         modules = TestMainModule.class
// )
// public interface MainComponent {
// 
//     void inject(MainActivity activity);
// 
//     void inject(MainTestCase testCase);
// 
//     public class Initializer {
// 
//         public static MainComponent mInstance;
// 
//         public static MainComponent init(Application app, MainPageView view) {
// 
//             MainComponent component = Dagger_MainComponent.builder()
//                     .testMainModule(new TestMainModule(view))
//                     .build();
//             mInstance = component;
//             return component;
//         }
//     }
// 
// }


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.TextView;
import com.newegg.tr.dagger2prac.R;
import com.newegg.tr.dagger2prac.model.action.ActionType;
import com.newegg.tr.dagger2prac.presenter.MainPresenter;
import com.newegg.tr.dagger2prac.view.MainPageView;
import com.newegg.tr.dagger2prac.view.component.MainComponent;
import javax.inject.Inject;
import butterknife.ButterKnife;
import butterknife.InjectView;
package com.newegg.tr.dagger2prac.view.activity;






public class MainActivity extends BaseActivity implements MainPageView, AdapterView.OnItemSelectedListener {

    public static MainComponent component;

    @Inject
    MainPresenter mPresenter;

    @InjectView(R.id.mainPage_messageText)
    TextView messageTextView;
    @InjectView(R.id.mainPage_actionSpinner)
    Spinner actionSpinner;
    @InjectView(R.id.mainPage_inputEditText)
    EditText inputText;
    @InjectView(R.id.mainPage_submitButton)
    Button submitButton;
    @InjectView(R.id.mainPage_progress)
    View progress;

    @Override
    protected void onCreateComponent() {

// Path: app/src/main/java/com/newegg/tr/dagger2prac/model/action/ActionType.java
// public enum ActionType {
//     HELLO, BYE, FIBONACCI
// }
// 
// Path: app/src/main/java/com/newegg/tr/dagger2prac/presenter/MainPresenter.java
// public interface MainPresenter {
// 
//     public void onActionSelected(ActionType type);
// 
//     public void calcFib(int fibNumber);
// 
//     public void updateUser();
// }
// 
// Path: app/src/main/java/com/newegg/tr/dagger2prac/view/MainPageView.java
// public interface MainPageView {
// 
//     public void showActionResultText(String resultText);
// 
//     public void showInputMethodView(boolean isShow);
// 
//     public void showLoading();
// 
//     public void hideLoading();
// 
//     public void onActionError();
// }
// 
// Path: app/src/debug/java/com/newegg/tr/dagger2prac/view/component/MainComponent.java
// @Singleton
// @Component(
//         modules = TestMainModule.class
// )
// public interface MainComponent {
// 
//     void inject(MainActivity activity);
// 
//     void inject(MainTestCase testCase);
// 
//     public class Initializer {
// 
//         public static MainComponent mInstance;
// 
//         public static MainComponent init(Application app, MainPageView view) {
// 
//             MainComponent component = Dagger_MainComponent.builder()
//                     .testMainModule(new TestMainModule(view))
//                     .build();
//             mInstance = component;
//             return component;
//         }
//     }
// 
// }


// Path: app/src/main/java/com/newegg/tr/dagger2prac/view/activity/MainActivity.java
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.TextView;
import com.newegg.tr.dagger2prac.R;
import com.newegg.tr.dagger2prac.model.action.ActionType;
import com.newegg.tr.dagger2prac.presenter.MainPresenter;
import com.newegg.tr.dagger2prac.view.MainPageView;
import com.newegg.tr.dagger2prac.view.component.MainComponent;
import javax.inject.Inject;
import butterknife.ButterKnife;
import butterknife.InjectView;

package com.newegg.tr.dagger2prac.view.activity;






public class MainActivity extends BaseActivity implements MainPageView, AdapterView.OnItemSelectedListener {

    public static MainComponent component;

    @Inject
    MainPresenter mPresenter;

    @InjectView(R.id.mainPage_messageText)
    TextView messageTextView;
    @InjectView(R.id.mainPage_actionSpinner)
    Spinner actionSpinner;
    @InjectView(R.id.mainPage_inputEditText)
    EditText inputText;
    @InjectView(R.id.mainPage_submitButton)
    Button submitButton;
    @InjectView(R.id.mainPage_progress)
    View progress;

    @Override
    protected void onCreateComponent() {

        MainComponent.Initializer.init(getApplication(), this).inject(this);