package com.arellomobile.mvp;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/**
 * Date: 19-Dec-15
 * Time: 13:25
 *
 * @author Alexander Blinov
 * @author Yuri Shmakov
 * @author Konstantin Tckhovrebov
 */
public class MvpFragment extends Fragment
{
	private MvpDelegate<? extends MvpFragment> mMvpDelegate;

	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);

		getMvpDelegate().onCreate(savedInstanceState);
	}

	public void onStart()
	{
		super.onStart();

		getMvpDelegate().onAttach();
	}

	@Override
	public void onDestroyView()
	{
		super.onDestroyView();

		getMvpDelegate().onDetach();
	}

	@Override
	public void onDestroy()
	{
		super.onDestroy();

		if (isRemoving())
		{
			getMvpDelegate().onDestroy();
		}
	}

	public void onSaveInstanceState(Bundle outState)
	{
		super.onSaveInstanceState(outState);

		getMvpDelegate().onSaveInstanceState(outState);
	}

	public MvpDelegate getMvpDelegate()
	{
		if (mMvpDelegate == null)
		{
			mMvpDelegate = new MvpDelegate<>(this);
		}

		return mMvpDelegate;
	}
}
@@ -815,16 +815,47 @@
 moving()
+ %7C%7C getActivity().isFinishing()
 )%0A%09%09%7B%0A%09%09
@@ -1187,8 +1187,9 @@
 te;%0A%09%7D%0A%7D
+%0A

Update MvpFragment.java