Created
February 1, 2016 11:50
-
-
Save vilmarbfilho/b9d73b52a5236188c2f9 to your computer and use it in GitHub Desktop.
Life cycle fragment android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BaseFragment extends Fragment{ | |
private static final String TAG = "base_fragment"; | |
@Override | |
public void onAttach(Context context) { | |
super.onAttach(context); | |
Log.i(TAG, "onAttach()"); | |
} | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
Log.i(TAG, "onCreate()"); | |
} | |
@Nullable | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
Log.i(TAG, "onCreateView()"); | |
return super.onCreateView(inflater, container, savedInstanceState); | |
} | |
@Override | |
public void onActivityCreated(@Nullable Bundle savedInstanceState) { | |
super.onActivityCreated(savedInstanceState); | |
Log.i(TAG, "onActivityCreated()"); | |
} | |
@Override | |
public void onStart() { | |
super.onStart(); | |
Log.i(TAG, "onStart()"); | |
} | |
@Override | |
public void onResume() { | |
super.onResume(); | |
Log.i(TAG, "onResume()"); | |
} | |
@Override | |
public void onPause() { | |
super.onPause(); | |
Log.i(TAG, "onPause()"); | |
} | |
@Override | |
public void onStop() { | |
super.onStop(); | |
Log.i(TAG, "onStop()"); | |
} | |
@Override | |
public void onDestroyView() { | |
super.onDestroyView(); | |
Log.i(TAG, "onDestroyView()"); | |
} | |
@Override | |
public void onDestroy() { | |
super.onDestroy(); | |
Log.i(TAG, "onDestroy()"); | |
} | |
@Override | |
public void onDetach() { | |
super.onDetach(); | |
Log.i(TAG, "onDetach()"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Life cycle fragment Android