Versions
[{“Name”:“3.0.x”,“GroupName”:null},{“Name”:“3.1.x”,“GroupName”:null},{“Name”:“3.2.x”,“GroupName”:null},{“Name”:“4.0”,“GroupName”:null},{“Name”:“4.0.3”,“GroupName”:null},{“Name”:“4.1”,“GroupName”:null},{“Name”:“4.2”,“GroupName”:null},{“Name”:“4.3”,“GroupName”:null},{“Name”:“4.4”,“GroupName”:null},{“Name”:“4.4W”,“GroupName”:null},{“Name”:“5.0”,“GroupName”:null},{“Name”:“5.1”,“GroupName”:null},{“Name”:“6.0”,“GroupName”:null},{“Name”:“7.0”,“GroupName”:null},{“Name”:“7.1”,“GroupName”:null}]
Introduction
Introduction about Fragments and their intercommunication mechanism
Syntax
- void onActivityCreated(Bundle savedInstanceState) // Called when the fragment’s activity has been created and this fragment’s view hierarchy instantiated.
- void onActivityResult(int requestCode, int resultCode, Intent data) // Receive the result from a previous call to startActivityForResult(Intent, int).
- void onAttach(Activity activity) // This method was deprecated in API level 23. Use onAttach(Context) instead.
- void onAttach(Context context) // Called when a fragment is first attached to its context.
- void onAttachFragment(Fragment childFragment) // Called when a fragment is attached as a child of this fragment.
- void onConfigurationChanged(Configuration newConfig) // Called by the system when the device configuration changes while your component is running.
- void onCreate(Bundle savedInstanceState) // Called to do initial creation of a fragment.
- View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) // Called to have the fragment instantiate its user interface view.
- void onDestroy() // Called when the fragment is no longer in use.
- void onDestroyView() // Called when the view previously created by onCreateView(LayoutInflater, ViewGroup, Bundle) has been detached from the fragment.
- void onDetach() // Called when the fragment is no longer attached to its activity.
- void onInflate(Activity activity, AttributeSet attrs, Bundle savedInstanceState) // This method was deprecated in API level 23. Use onInflate(Context, AttributeSet, Bundle) instead.
- void onInflate(Context context, AttributeSet attrs, Bundle savedInstanceState) // Called when a fragment is being created as part of a view layout inflation, typically from setting the content view of an activity.
- void onPause() // Called when the Fragment is no longer resumed.
- void onResume() // Called when the fragment is visible to the user and actively running.