public override void OnAttach(Context context) { base.OnAttach(context); if (context is IOnFragmentInteractionListener) { _listener = (IOnFragmentInteractionListener)context; } else { throw new RuntimeException(context.ToString() + " must implement OnFragmentInteractionListener"); } }
public override void OnDetach() { base.OnDetach(); _listener = null; }