// Path: app/src/main/java/com/ryansteckler/nlpunbounce/helpers/ThemeHelper.java
// public class ThemeHelper {
// 
//     private static int sTheme = -1;
//     public final static int THEME_DEFAULT = 0;
//     public final static int THEME_DARK = 1;
//     /**
//      * Set the theme of the Activity, and restart it by creating a new Activity of the same type.
//      */
//     public static void changeToTheme(Activity activity, int theme)
//     {
//         sTheme = theme;
//         activity.finish();
//         activity.startActivity(new Intent(activity, activity.getClass()));
//     }
//     /** Set the theme of the activity, according to the configuration. */
//     public static int onActivityCreateSetTheme(Activity activity)
//     {
//         if (sTheme == -1) {
//             // Load from prefs
//             SharedPreferences prefs = activity.getSharedPreferences("com.ryansteckler.nlpunbounce" + "_preferences", Context.MODE_WORLD_READABLE);
//             sTheme = prefs.getString("theme", "default").equals("default") ? THEME_DEFAULT : THEME_DARK;
//         }
// 
//         switch (sTheme)
//         {
//             default:
//             case THEME_DEFAULT:
//                 activity.setTheme(R.style.UnbounceThemeLight);
//                 break;
//             case THEME_DARK:
//                 activity.setTheme(R.style.UnbounceThemeDark);
//                 break;
//         }
//         return sTheme;
//     }
//     public static int onActivityResumeVerifyTheme(Activity activity, int curTheme)
//     {
//         if (curTheme != sTheme) {
//             changeToTheme(activity, sTheme);
//         }
// 
//         return sTheme;
//     }
// 
//     public static int getTheme() {
//         return sTheme;
//     }
// 
// }


import android.app.ActionBar;
import android.app.Activity;
import android.app.Fragment;
import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import com.ryansteckler.nlpunbounce.helpers.ThemeHelper;
package com.ryansteckler.nlpunbounce;




/**
 * Fragment used for managing interactions for and presentation of a navigation drawer.
 * See the <a href="https://developer.android.com/design/patterns/navigation-drawer.html#Interaction">
 * design guidelines</a> for a complete explanation of the behaviors implemented here.
 */
public class NavigationDrawerFragment extends Fragment {

    /**
     * Remember the position of the selected item.
     */
    private static final String STATE_SELECTED_POSITION = "selected_navigation_drawer_position";

    private boolean mClosing = false;
    /**
     * A pointer to the current callbacks instance (the Activity).
     */
    private NavigationDrawerCallbacks mCallbacks;

    /**
     * Helper component that ties the action bar to the navigation drawer.
     */
    private ActionBarDrawerToggle mDrawerToggle;

    private DrawerLayout mDrawerLayout;
    private ListView mDrawerListView;
    private View mFragmentContainerView;

    private int mCurrentSelectedPosition = 0;
    private boolean mFromSavedInstanceState;

    public NavigationDrawerFragment() {
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
// Path: app/src/main/java/com/ryansteckler/nlpunbounce/helpers/ThemeHelper.java
// public class ThemeHelper {
// 
//     private static int sTheme = -1;
//     public final static int THEME_DEFAULT = 0;
//     public final static int THEME_DARK = 1;
//     /**
//      * Set the theme of the Activity, and restart it by creating a new Activity of the same type.
//      */
//     public static void changeToTheme(Activity activity, int theme)
//     {
//         sTheme = theme;
//         activity.finish();
//         activity.startActivity(new Intent(activity, activity.getClass()));
//     }
//     /** Set the theme of the activity, according to the configuration. */
//     public static int onActivityCreateSetTheme(Activity activity)
//     {
//         if (sTheme == -1) {
//             // Load from prefs
//             SharedPreferences prefs = activity.getSharedPreferences("com.ryansteckler.nlpunbounce" + "_preferences", Context.MODE_WORLD_READABLE);
//             sTheme = prefs.getString("theme", "default").equals("default") ? THEME_DEFAULT : THEME_DARK;
//         }
// 
//         switch (sTheme)
//         {
//             default:
//             case THEME_DEFAULT:
//                 activity.setTheme(R.style.UnbounceThemeLight);
//                 break;
//             case THEME_DARK:
//                 activity.setTheme(R.style.UnbounceThemeDark);
//                 break;
//         }
//         return sTheme;
//     }
//     public static int onActivityResumeVerifyTheme(Activity activity, int curTheme)
//     {
//         if (curTheme != sTheme) {
//             changeToTheme(activity, sTheme);
//         }
// 
//         return sTheme;
//     }
// 
//     public static int getTheme() {
//         return sTheme;
//     }
// 
// }


// Path: app/src/main/java/com/ryansteckler/nlpunbounce/NavigationDrawerFragment.java
import android.app.ActionBar;
import android.app.Activity;
import android.app.Fragment;
import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import com.ryansteckler.nlpunbounce.helpers.ThemeHelper;

package com.ryansteckler.nlpunbounce;




/**
 * Fragment used for managing interactions for and presentation of a navigation drawer.
 * See the <a href="https://developer.android.com/design/patterns/navigation-drawer.html#Interaction">
 * design guidelines</a> for a complete explanation of the behaviors implemented here.
 */
public class NavigationDrawerFragment extends Fragment {

    /**
     * Remember the position of the selected item.
     */
    private static final String STATE_SELECTED_POSITION = "selected_navigation_drawer_position";

    private boolean mClosing = false;
    /**
     * A pointer to the current callbacks instance (the Activity).
     */
    private NavigationDrawerCallbacks mCallbacks;

    /**
     * Helper component that ties the action bar to the navigation drawer.
     */
    private ActionBarDrawerToggle mDrawerToggle;

    private DrawerLayout mDrawerLayout;
    private ListView mDrawerListView;
    private View mFragmentContainerView;

    private int mCurrentSelectedPosition = 0;
    private boolean mFromSavedInstanceState;

    public NavigationDrawerFragment() {
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ThemeHelper.onActivityCreateSetTheme(this.getActivity());