// Path: app/src/main/java/com/newegg/tr/dagger2prac/Dagger2pracApp.java
// public class Dagger2pracApp extends Application {
// 
//     public static boolean MOCK_MODE = true;
// 
//     GlobalComponent mComponent;
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         mComponent = Dagger_GlobalComponent.create();
// 
//     }
// 
//     public GlobalComponent component() {
//         return mComponent;
//     }
// 
// }
// 
// Path: app/src/main/java/com/newegg/tr/dagger2prac/view/SettingView.java
// public interface SettingView {
// 
//     public void updateUserName(String userName);
// 
// }
// 
// Path: app/src/main/java/com/newegg/tr/dagger2prac/view/activity/SettingActivity.java
// public class SettingActivity extends BaseActivity implements SettingView, View.OnClickListener {
// 
//     @Inject
//     SettingPresenter mPresenter;
// 
//     @InjectView(R.id.settingPage_userNameTextView)
//     TextView mUserNameTextView;
// 
//     @InjectView(R.id.settingPage_changeUserNameButton)
//     TextView mChangeNameButton;
// 
//     @Override
//     protected void onCreateComponent() {
//         SettingComponent.Initializer.init(getApplication(), this).inject(this);
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_setting);
//         ButterKnife.inject(this);
// 
//         mChangeNameButton.setOnClickListener(this);
//         mUserNameTextView.setOnClickListener(this);
//         updateUserName(mPresenter.getUserName());
//     }
// 
//     @Override
//     public void onClick(View v) {
// 
//         final View dialogView = getLayoutInflater().inflate(R.layout.activity_setting_dialog, null);
// 
//         final AlertDialog renameDialog = new AlertDialog.Builder(this).setTitle("Change User Name").setView(dialogView).setPositiveButton("OK", new DialogInterface.OnClickListener() {
//             @Override
//             public void onClick(DialogInterface dialog, int which) {
//                 EditText renameEditText = (EditText) dialogView.findViewById(R.id.settingPage_dialogRenameEditText);
//                 mPresenter.setUserName(renameEditText.getText().toString());
//                 dialog.dismiss();
//                 setResult(Activity.RESULT_OK);
//             }
//         }).setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
//             @Override
//             public void onClick(DialogInterface dialog, int which) {
//                 dialog.dismiss();
//             }
//         }).create();
// 
//         renameDialog.show();
// 
//     }
// 
//     @Override
//     public void updateUserName(String userName) {
//         mUserNameTextView.setText(userName);
//     }
// }
// 
// Path: app/src/release/java/com/newegg/tr/dagger2prac/view/module/SettingModule.java
// @Module
// public class SettingModule {
//     SettingView view;
// 
//     public SettingModule(SettingView view) {
//         this.view = view;
//     }
// 
//     @Provides
//     public SettingPresenter presenter(Config config){
//         return new SettingPresenterImpl(view, config);
//     }
// 
// 
// }


import android.app.Application;
import com.newegg.tr.dagger2prac.Dagger2pracApp;
import com.newegg.tr.dagger2prac.view.SettingView;
import com.newegg.tr.dagger2prac.view.activity.SettingActivity;
import com.newegg.tr.dagger2prac.view.module.SettingModule;
import com.newegg.tr.dagger2prac.view.scope.Setting;
import dagger.Component;
package com.newegg.tr.dagger2prac.view.component;





/**
 * Created by william on 15/2/3.
 */
@Setting
@Component(
        dependencies = com.newegg.tr.dagger2prac.view.component.GlobalComponent.class,
        modules = SettingModule.class
)
public interface SettingComponent {

// Path: app/src/main/java/com/newegg/tr/dagger2prac/Dagger2pracApp.java
// public class Dagger2pracApp extends Application {
// 
//     public static boolean MOCK_MODE = true;
// 
//     GlobalComponent mComponent;
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         mComponent = Dagger_GlobalComponent.create();
// 
//     }
// 
//     public GlobalComponent component() {
//         return mComponent;
//     }
// 
// }
// 
// Path: app/src/main/java/com/newegg/tr/dagger2prac/view/SettingView.java
// public interface SettingView {
// 
//     public void updateUserName(String userName);
// 
// }
// 
// Path: app/src/main/java/com/newegg/tr/dagger2prac/view/activity/SettingActivity.java
// public class SettingActivity extends BaseActivity implements SettingView, View.OnClickListener {
// 
//     @Inject
//     SettingPresenter mPresenter;
// 
//     @InjectView(R.id.settingPage_userNameTextView)
//     TextView mUserNameTextView;
// 
//     @InjectView(R.id.settingPage_changeUserNameButton)
//     TextView mChangeNameButton;
// 
//     @Override
//     protected void onCreateComponent() {
//         SettingComponent.Initializer.init(getApplication(), this).inject(this);
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_setting);
//         ButterKnife.inject(this);
// 
//         mChangeNameButton.setOnClickListener(this);
//         mUserNameTextView.setOnClickListener(this);
//         updateUserName(mPresenter.getUserName());
//     }
// 
//     @Override
//     public void onClick(View v) {
// 
//         final View dialogView = getLayoutInflater().inflate(R.layout.activity_setting_dialog, null);
// 
//         final AlertDialog renameDialog = new AlertDialog.Builder(this).setTitle("Change User Name").setView(dialogView).setPositiveButton("OK", new DialogInterface.OnClickListener() {
//             @Override
//             public void onClick(DialogInterface dialog, int which) {
//                 EditText renameEditText = (EditText) dialogView.findViewById(R.id.settingPage_dialogRenameEditText);
//                 mPresenter.setUserName(renameEditText.getText().toString());
//                 dialog.dismiss();
//                 setResult(Activity.RESULT_OK);
//             }
//         }).setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
//             @Override
//             public void onClick(DialogInterface dialog, int which) {
//                 dialog.dismiss();
//             }
//         }).create();
// 
//         renameDialog.show();
// 
//     }
// 
//     @Override
//     public void updateUserName(String userName) {
//         mUserNameTextView.setText(userName);
//     }
// }
// 
// Path: app/src/release/java/com/newegg/tr/dagger2prac/view/module/SettingModule.java
// @Module
// public class SettingModule {
//     SettingView view;
// 
//     public SettingModule(SettingView view) {
//         this.view = view;
//     }
// 
//     @Provides
//     public SettingPresenter presenter(Config config){
//         return new SettingPresenterImpl(view, config);
//     }
// 
// 
// }


// Path: app/src/release/java/com/newegg/tr/dagger2prac/view/component/SettingComponent.java
import android.app.Application;
import com.newegg.tr.dagger2prac.Dagger2pracApp;
import com.newegg.tr.dagger2prac.view.SettingView;
import com.newegg.tr.dagger2prac.view.activity.SettingActivity;
import com.newegg.tr.dagger2prac.view.module.SettingModule;
import com.newegg.tr.dagger2prac.view.scope.Setting;
import dagger.Component;

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





/**
 * Created by william on 15/2/3.
 */
@Setting
@Component(
        dependencies = com.newegg.tr.dagger2prac.view.component.GlobalComponent.class,
        modules = SettingModule.class
)
public interface SettingComponent {

    void inject(SettingActivity activity);