@Override public void onAttach(Activity activity) { ZooGate.myActivity = activity; super.onAttach(activity); ((ZooGate) activity).onSectionAttached(getArguments().getInt(ZooGate.ARG_SECTION_NUMBER)); }