// Path: app/src/main/java/com/michaelvescovo/android/itemreaper/ItemReaperApplication.java
// public class ItemReaperApplication extends Application {
// 
//     private ApplicationComponent mApplicationComponent;
//     private RepositoryComponent mRepositoryComponent;
// 
//     static {
//         AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_AUTO);
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         mApplicationComponent = DaggerApplicationComponent.builder().applicationModule(
//                 new ApplicationModule(PreferenceManager.getDefaultSharedPreferences(this))).build();
//         mRepositoryComponent = DaggerRepositoryComponent.builder().build();
//     }
// 
//     public ApplicationComponent getApplicationComponent() {
//         return mApplicationComponent;
//     }
// 
//     public RepositoryComponent getRepositoryComponent() {
//         return mRepositoryComponent;
//     }
// }
// 
// Path: app/src/main/java/com/michaelvescovo/android/itemreaper/util/EspressoIdlingResource.java
// public class EspressoIdlingResource {
// 
//     private static final String RESOURCE = "GLOBAL";
// 
//     private static SimpleCountingIdlingResource mCountingIdlingResource =
//             new SimpleCountingIdlingResource(RESOURCE);
// 
//     public static void increment() {
//         mCountingIdlingResource.increment();
//     }
// 
//     public static void decrement() {
//         mCountingIdlingResource.decrement();
//     }
// 
//     public static IdlingResource getIdlingResource() {
//         return mCountingIdlingResource;
//     }
// }


import android.graphics.Typeface;
import android.os.Bundle;
import android.support.annotation.VisibleForTesting;
import android.support.test.espresso.IdlingResource;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.widget.TextView;
import com.michaelvescovo.android.itemreaper.ItemReaperApplication;
import com.michaelvescovo.android.itemreaper.R;
import com.michaelvescovo.android.itemreaper.util.EspressoIdlingResource;
import butterknife.BindView;
import butterknife.ButterKnife;
        setResult(RESULT_CANCELED);
        super.onBackPressed();
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_auth);
        ButterKnife.bind(this);
        setSupportActionBar(mToolbar);
        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null) {
            actionBar.setDisplayShowTitleEnabled(false);
        }
        Typeface appbarTitle = Typeface.createFromAsset(getAssets(), "Nosifer-Regular.ttf");
        mAppbarTitle.setTypeface(appbarTitle);

        // Create the View
        AuthFragment authFragment = (AuthFragment) getSupportFragmentManager()
                .findFragmentById(R.id.contentFrame);
        if (authFragment == null) {
            authFragment = AuthFragment.newInstance();
            initFragment(authFragment);
        }

        // Create the Presenter which does the following:
        // Sets authFragment as the View for authPresenter.
        // Sets authPresenter as the presenter for authFragment.
        AuthComponent authComponent = DaggerAuthComponent.builder()
                .authModule(new AuthModule(authFragment))
// Path: app/src/main/java/com/michaelvescovo/android/itemreaper/ItemReaperApplication.java
// public class ItemReaperApplication extends Application {
// 
//     private ApplicationComponent mApplicationComponent;
//     private RepositoryComponent mRepositoryComponent;
// 
//     static {
//         AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_AUTO);
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         mApplicationComponent = DaggerApplicationComponent.builder().applicationModule(
//                 new ApplicationModule(PreferenceManager.getDefaultSharedPreferences(this))).build();
//         mRepositoryComponent = DaggerRepositoryComponent.builder().build();
//     }
// 
//     public ApplicationComponent getApplicationComponent() {
//         return mApplicationComponent;
//     }
// 
//     public RepositoryComponent getRepositoryComponent() {
//         return mRepositoryComponent;
//     }
// }
// 
// Path: app/src/main/java/com/michaelvescovo/android/itemreaper/util/EspressoIdlingResource.java
// public class EspressoIdlingResource {
// 
//     private static final String RESOURCE = "GLOBAL";
// 
//     private static SimpleCountingIdlingResource mCountingIdlingResource =
//             new SimpleCountingIdlingResource(RESOURCE);
// 
//     public static void increment() {
//         mCountingIdlingResource.increment();
//     }
// 
//     public static void decrement() {
//         mCountingIdlingResource.decrement();
//     }
// 
//     public static IdlingResource getIdlingResource() {
//         return mCountingIdlingResource;
//     }
// }


// Path: app/src/main/java/com/michaelvescovo/android/itemreaper/auth/AuthActivity.java
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.annotation.VisibleForTesting;
import android.support.test.espresso.IdlingResource;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.widget.TextView;
import com.michaelvescovo.android.itemreaper.ItemReaperApplication;
import com.michaelvescovo.android.itemreaper.R;
import com.michaelvescovo.android.itemreaper.util.EspressoIdlingResource;
import butterknife.BindView;
import butterknife.ButterKnife;

        setResult(RESULT_CANCELED);
        super.onBackPressed();
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_auth);
        ButterKnife.bind(this);
        setSupportActionBar(mToolbar);
        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null) {
            actionBar.setDisplayShowTitleEnabled(false);
        }
        Typeface appbarTitle = Typeface.createFromAsset(getAssets(), "Nosifer-Regular.ttf");
        mAppbarTitle.setTypeface(appbarTitle);

        // Create the View
        AuthFragment authFragment = (AuthFragment) getSupportFragmentManager()
                .findFragmentById(R.id.contentFrame);
        if (authFragment == null) {
            authFragment = AuthFragment.newInstance();
            initFragment(authFragment);
        }

        // Create the Presenter which does the following:
        // Sets authFragment as the View for authPresenter.
        // Sets authPresenter as the presenter for authFragment.
        AuthComponent authComponent = DaggerAuthComponent.builder()
                .authModule(new AuthModule(authFragment))
                .applicationComponent(((ItemReaperApplication)getApplication()).getApplicationComponent())