package com.jillberthestillore.flames.fragments;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.View;
import butterknife.ButterKnife;

import com.jillberthestillore.flames.BusProvider;
import com.squareup.otto.Bus;

public class BaseFragment extends Fragment {
	
	Bus bus = BusProvider.getInstance();
	
	@Override
	public void onDestroyView() {
		super.onDestroyView();
		ButterKnife.reset(this);
	}

	@Override
	public void onPause() {
		super.onPause();
		bus.unregister(this);
	}

	@Override
	public void onResume() {
		super.onResume();
		bus.register(this);
	}

	@Override
	public void onViewCreated(View view, Bundle savedInstanceState) {
		super.onViewCreated(view, savedInstanceState);
		ButterKnife.inject(this, view);
	}
	
}

@@ -109,16 +109,63 @@
 agment;%0A
+import android.support.v4.app.FragmentManager;%0A
 import a
@@ -261,24 +261,64 @@
 usProvider;%0A
+import com.jillberthestillore.flames.R;%0A
 import com.s
@@ -853,10 +853,242 @@
 );%0A%09%7D%0A%09%0A
+%09protected void changeFragment(Fragment fragment) %7B%0A%09%09FragmentManager fragmentManager = getFragmentManager();%0A%09%09fragmentManager.beginTransaction()%0A%09%09%09%09.replace(R.id.container, fragment)%0A%09%09%09%09.addToBackStack(null)%0A%09%09%09%09.commit();%0A%09%7D%0A%09%0A
 %7D%0A

Add base fragment class.