// Path: app/src/main/java/com/wiseass/profiler/util/ActivityUtils.java
// public class ActivityUtils extends AppCompatActivity {
// 
//     /**
//      * The {@code fragment} is added to the container view with id {@code frameId}. The operation is
//      * performed by the {@code fragmentManager}.
//      *
//      */
//     public static void addFragmentToActivity (FragmentManager fragmentManager,
//                                               Fragment fragment,
//                                               int frameId,
//                                               String tag) {
// 
//         FragmentTransaction transaction = fragmentManager.beginTransaction();
//         transaction.replace(frameId, fragment, tag);
//         transaction.commit();
//     }
// 
// }


import android.app.FragmentManager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.wiseass.profiler.R;
import com.wiseass.profiler.util.ActivityUtils;
import static android.R.attr.fragment;
package com.wiseass.profiler.login;




/**
 * Activity in Model View Presenter:
 * Initialize the View and Presenter (by extension).
 */
public class LoginActivity extends AppCompatActivity {
    private static final String LOGIN_FRAGMENT = "LOGIN_FRAGMENT";
    private FragmentManager manager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);

        manager = getFragmentManager();

        LoginFragment fragment = (LoginFragment) manager.findFragmentByTag(LOGIN_FRAGMENT);

        if (fragment == null){
            fragment = LoginFragment.newInstance();
        }

// Path: app/src/main/java/com/wiseass/profiler/util/ActivityUtils.java
// public class ActivityUtils extends AppCompatActivity {
// 
//     /**
//      * The {@code fragment} is added to the container view with id {@code frameId}. The operation is
//      * performed by the {@code fragmentManager}.
//      *
//      */
//     public static void addFragmentToActivity (FragmentManager fragmentManager,
//                                               Fragment fragment,
//                                               int frameId,
//                                               String tag) {
// 
//         FragmentTransaction transaction = fragmentManager.beginTransaction();
//         transaction.replace(frameId, fragment, tag);
//         transaction.commit();
//     }
// 
// }


// Path: app/src/main/java/com/wiseass/profiler/login/LoginActivity.java
import android.app.FragmentManager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.wiseass.profiler.R;
import com.wiseass.profiler.util.ActivityUtils;
import static android.R.attr.fragment;

package com.wiseass.profiler.login;




/**
 * Activity in Model View Presenter:
 * Initialize the View and Presenter (by extension).
 */
public class LoginActivity extends AppCompatActivity {
    private static final String LOGIN_FRAGMENT = "LOGIN_FRAGMENT";
    private FragmentManager manager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);

        manager = getFragmentManager();

        LoginFragment fragment = (LoginFragment) manager.findFragmentByTag(LOGIN_FRAGMENT);

        if (fragment == null){
            fragment = LoginFragment.newInstance();
        }

        ActivityUtils.addFragmentToActivity(manager,