Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Inherited XML Attrs](https://developer.android.com/reference/android/webkit/WebViewFragment#inhattrs) \| [Inherited Constants](https://developer.android.com/reference/android/webkit/WebViewFragment#inhconstants) \| [Ctors](https://developer.android.com/reference/android/webkit/WebViewFragment#pubctors) \| [Methods](https://developer.android.com/reference/android/webkit/WebViewFragment#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/webkit/WebViewFragment#inhmethods)

# WebViewFragment

*** ** * ** ***

` public class WebViewFragment `   
` ` ` extends https://developer.android.com/reference/android/app/Fragment ` ` `

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.app.Fragment](https://developer.android.com/reference/android/app/Fragment) ||
|   | ↳ | android.webkit.WebViewFragment |

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 28.**   

Manually call `https://developer.android.com/reference/android/webkit/WebView#onPause()` and `https://developer.android.com/reference/android/webkit/WebView#onResume()`

A fragment that displays a WebView.

The WebView is automically paused or resumed when the Fragment is paused or resumed.

## Summary

### Inherited XML attributes

From class `https://developer.android.com/reference/android/app/Fragment` [`android:fragmentAllowEnterTransitionOverlap`](https://developer.android.com/reference/android/app/Fragment#attr_android:fragmentAllowEnterTransitionOverlap) Sets whether the enter and exit transitions should overlap when transitioning forward. [`android:fragmentAllowReturnTransitionOverlap`](https://developer.android.com/reference/android/app/Fragment#attr_android:fragmentAllowReturnTransitionOverlap) Sets whether the enter and exit transitions should overlap when transitioning because of popping the back stack. [`android:fragmentEnterTransition`](https://developer.android.com/reference/android/app/Fragment#attr_android:fragmentEnterTransition) The Transition that will be used to move Views into the initial scene. [`android:fragmentExitTransition`](https://developer.android.com/reference/android/app/Fragment#attr_android:fragmentExitTransition) The Transition that will be used to move Views out of the scene when the fragment is removed, hidden, or detached when not popping the back stack. [`android:fragmentReenterTransition`](https://developer.android.com/reference/android/app/Fragment#attr_android:fragmentReenterTransition) The Transition that will be used to move Views in to the scene when returning due to popping a back stack. [`android:fragmentSharedElementEnterTransition`](https://developer.android.com/reference/android/app/Fragment#attr_android:fragmentSharedElementEnterTransition) The Transition that will be used for shared elements transferred into the content Scene. [`android:fragmentSharedElementReturnTransition`](https://developer.android.com/reference/android/app/Fragment#attr_android:fragmentSharedElementReturnTransition) The Transition that will be used for shared elements transferred back during a pop of the back stack.

### Inherited constants

From interface `https://developer.android.com/reference/android/content/ComponentCallbacks2` `int` `https://developer.android.com/reference/android/content/ComponentCallbacks2#TRIM_MEMORY_BACKGROUND`

Level for `https://developer.android.com/reference/android/content/ComponentCallbacks2#onTrimMemory(int)`: the process has gone on to the LRU list.
`int` `https://developer.android.com/reference/android/content/ComponentCallbacks2#TRIM_MEMORY_COMPLETE`

*This constant was deprecated in API level 35. Apps are not notified of this level since API level 34*
`int` `https://developer.android.com/reference/android/content/ComponentCallbacks2#TRIM_MEMORY_MODERATE`

*This constant was deprecated in API level 35. Apps are not notified of this level since API level 34*
`int` `https://developer.android.com/reference/android/content/ComponentCallbacks2#TRIM_MEMORY_RUNNING_CRITICAL`

*This constant was deprecated in API level 35. Apps are not notified of this level since API level 34*
`int` `https://developer.android.com/reference/android/content/ComponentCallbacks2#TRIM_MEMORY_RUNNING_LOW`

*This constant was deprecated in API level 35. Apps are not notified of this level since API level 34*
`int` `https://developer.android.com/reference/android/content/ComponentCallbacks2#TRIM_MEMORY_RUNNING_MODERATE`

*This constant was deprecated in API level 35. Apps are not notified of this level since API level 34*
`int` `https://developer.android.com/reference/android/content/ComponentCallbacks2#TRIM_MEMORY_UI_HIDDEN`

Level for `https://developer.android.com/reference/android/content/ComponentCallbacks2#onTrimMemory(int)`: the process had been showing a user interface, and is no longer doing so.

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/webkit/WebViewFragment#WebViewFragment()() ` |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/webkit/WebView` | ` https://developer.android.com/reference/android/webkit/WebViewFragment#getWebView()() ` Gets the WebView. |
| ` https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/webkit/WebViewFragment#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle)(https://developer.android.com/reference/android/view/LayoutInflater inflater, https://developer.android.com/reference/android/view/ViewGroup container, https://developer.android.com/reference/android/os/Bundle savedInstanceState) ` Called to instantiate the view. |
| ` void` | ` https://developer.android.com/reference/android/webkit/WebViewFragment#onDestroy()() ` Called when the fragment is no longer in use. |
| ` void` | ` https://developer.android.com/reference/android/webkit/WebViewFragment#onDestroyView()() ` Called when the WebView has been detached from the fragment. |
| ` void` | ` https://developer.android.com/reference/android/webkit/WebViewFragment#onPause()() ` Called when the fragment is visible to the user and actively running. |
| ` void` | ` https://developer.android.com/reference/android/webkit/WebViewFragment#onResume()() ` Called when the fragment is no longer resumed. |

### Inherited methods

From class ` https://developer.android.com/reference/android/app/Fragment ` ` void` ` https://developer.android.com/reference/android/app/Fragment#dump(java.lang.String,%20java.io.FileDescriptor,%20java.io.PrintWriter,%20java.lang.String[])(https://developer.android.com/reference/java/lang/String prefix, https://developer.android.com/reference/java/io/FileDescriptor fd, https://developer.android.com/reference/java/io/PrintWriter writer, https://developer.android.com/reference/java/lang/String args) `

Print the Fragments's state into the given stream.
` final boolean` ` https://developer.android.com/reference/android/app/Fragment#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object o) `

Subclasses can not override equals().
` final https://developer.android.com/reference/android/app/Activity` ` https://developer.android.com/reference/android/app/Fragment#getActivity()() `

Return the Activity this fragment is currently associated with.
` boolean` ` https://developer.android.com/reference/android/app/Fragment#getAllowEnterTransitionOverlap()() `

Returns whether the exit transition and enter transition overlap or not.
` boolean` ` https://developer.android.com/reference/android/app/Fragment#getAllowReturnTransitionOverlap()() `

Returns whether the return transition and reenter transition overlap or not.
` final https://developer.android.com/reference/android/os/Bundle` ` https://developer.android.com/reference/android/app/Fragment#getArguments()() `

Return the arguments supplied to `https://developer.android.com/reference/android/app/Fragment#setArguments(android.os.Bundle)`, if any.
` final https://developer.android.com/reference/android/app/FragmentManager` ` https://developer.android.com/reference/android/app/Fragment#getChildFragmentManager()() `

Return a private FragmentManager for placing and managing Fragments inside of this Fragment.
` https://developer.android.com/reference/android/content/Context` ` https://developer.android.com/reference/android/app/Fragment#getContext()() `

Return the `https://developer.android.com/reference/android/content/Context` this fragment is currently associated with.
` https://developer.android.com/reference/android/transition/Transition` ` https://developer.android.com/reference/android/app/Fragment#getEnterTransition()() `

Returns the Transition that will be used to move Views into the initial scene.
` https://developer.android.com/reference/android/transition/Transition` ` https://developer.android.com/reference/android/app/Fragment#getExitTransition()() `

Returns the Transition that will be used to move Views out of the scene when the fragment is removed, hidden, or detached when not popping the back stack.
` final https://developer.android.com/reference/android/app/FragmentManager` ` https://developer.android.com/reference/android/app/Fragment#getFragmentManager()() `

Return the FragmentManager for interacting with fragments associated with this fragment's activity.
` final https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/android/app/Fragment#getHost()() `

Return the host object of this fragment.
` final int` ` https://developer.android.com/reference/android/app/Fragment#getId()() `

Return the identifier this fragment is known by.
` final https://developer.android.com/reference/android/view/LayoutInflater` ` https://developer.android.com/reference/android/app/Fragment#getLayoutInflater()() `

Returns the cached LayoutInflater used to inflate Views of this Fragment.
` https://developer.android.com/reference/android/app/LoaderManager` ` https://developer.android.com/reference/android/app/Fragment#getLoaderManager()() `

*This method is deprecated. Use `https://developer.android.com/reference/androidx/fragment/app/Fragment.html#getLoaderManager()`*
` final https://developer.android.com/reference/android/app/Fragment` ` https://developer.android.com/reference/android/app/Fragment#getParentFragment()() `

Returns the parent Fragment containing this Fragment.
` https://developer.android.com/reference/android/transition/Transition` ` https://developer.android.com/reference/android/app/Fragment#getReenterTransition()() `

Returns the Transition that will be used to move Views in to the scene when returning due to popping a back stack.
` final https://developer.android.com/reference/android/content/res/Resources` ` https://developer.android.com/reference/android/app/Fragment#getResources()() `

Return `getActivity().getResources()`.
` final boolean` ` https://developer.android.com/reference/android/app/Fragment#getRetainInstance()() ` ` https://developer.android.com/reference/android/transition/Transition` ` https://developer.android.com/reference/android/app/Fragment#getReturnTransition()() `

Returns the Transition that will be used to move Views out of the scene when the Fragment is preparing to be removed, hidden, or detached because of popping the back stack.
` https://developer.android.com/reference/android/transition/Transition` ` https://developer.android.com/reference/android/app/Fragment#getSharedElementEnterTransition()() `

Returns the Transition that will be used for shared elements transferred into the content Scene.
` https://developer.android.com/reference/android/transition/Transition` ` https://developer.android.com/reference/android/app/Fragment#getSharedElementReturnTransition()() `

Return the Transition that will be used for shared elements transferred back during a pop of the back stack.
` final https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/app/Fragment#getString(int)(int resId) `

Return a localized string from the application's package's default string table.
` final https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/app/Fragment#getString(int,%20java.lang.Object[])(int resId, https://developer.android.com/reference/java/lang/Object formatArgs) `

Return a localized formatted string from the application's package's default string table, substituting the format arguments as defined in `https://developer.android.com/reference/java/util/Formatter` and `https://developer.android.com/reference/java/lang/String#format(java.lang.String,%20java.lang.Object[])`.
` final https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/app/Fragment#getTag()() `

Get the tag name of the fragment, if specified.
` final https://developer.android.com/reference/android/app/Fragment` ` https://developer.android.com/reference/android/app/Fragment#getTargetFragment()() `

Return the target fragment set by `https://developer.android.com/reference/android/app/Fragment#setTargetFragment(android.app.Fragment,%20int)`.
` final int` ` https://developer.android.com/reference/android/app/Fragment#getTargetRequestCode()() `

Return the target request code set by `https://developer.android.com/reference/android/app/Fragment#setTargetFragment(android.app.Fragment,%20int)`.
` final https://developer.android.com/reference/java/lang/CharSequence` ` https://developer.android.com/reference/android/app/Fragment#getText(int)(int resId) `

Return a localized, styled CharSequence from the application's package's default string table.
` boolean` ` https://developer.android.com/reference/android/app/Fragment#getUserVisibleHint()() ` ` https://developer.android.com/reference/android/view/View` ` https://developer.android.com/reference/android/app/Fragment#getView()() `

Get the root view for the fragment's layout (the one returned by `https://developer.android.com/reference/android/app/Fragment#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle)`), if provided.
` final int` ` https://developer.android.com/reference/android/app/Fragment#hashCode()() `

Subclasses can not override hashCode().
` static https://developer.android.com/reference/android/app/Fragment` ` https://developer.android.com/reference/android/app/Fragment#instantiate(android.content.Context,%20java.lang.String)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/java/lang/String fname) `

Like `https://developer.android.com/reference/android/app/Fragment#instantiate(android.content.Context,%20java.lang.String,%20android.os.Bundle)` but with a null argument Bundle.
` static https://developer.android.com/reference/android/app/Fragment` ` https://developer.android.com/reference/android/app/Fragment#instantiate(android.content.Context,%20java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/java/lang/String fname, https://developer.android.com/reference/android/os/Bundle args) `

Create a new instance of a Fragment with the given class name.
` final boolean` ` https://developer.android.com/reference/android/app/Fragment#isAdded()() `

Return true if the fragment is currently added to its activity.
` final boolean` ` https://developer.android.com/reference/android/app/Fragment#isDetached()() `

Return true if the fragment has been explicitly detached from the UI.
` final boolean` ` https://developer.android.com/reference/android/app/Fragment#isHidden()() `

Return true if the fragment has been hidden.
` final boolean` ` https://developer.android.com/reference/android/app/Fragment#isInLayout()() `

Return true if the layout is included as part of an activity view hierarchy via the \<fragment\> tag.
` final boolean` ` https://developer.android.com/reference/android/app/Fragment#isRemoving()() `

Return true if this fragment is currently being removed from its activity.
` final boolean` ` https://developer.android.com/reference/android/app/Fragment#isResumed()() `

Return true if the fragment is in the resumed state.
` final boolean` ` https://developer.android.com/reference/android/app/Fragment#isStateSaved()() `

Returns true if this fragment is added and its state has already been saved by its host.
` final boolean` ` https://developer.android.com/reference/android/app/Fragment#isVisible()() `

Return true if the fragment is currently visible to the user.
` void` ` https://developer.android.com/reference/android/app/Fragment#onActivityCreated(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle savedInstanceState) `

Called when the fragment's activity has been created and this fragment's view hierarchy instantiated.
` void` ` https://developer.android.com/reference/android/app/Fragment#onActivityResult(int,%20int,%20android.content.Intent)(int requestCode, int resultCode, https://developer.android.com/reference/android/content/Intent data) `

Receive the result from a previous call to `https://developer.android.com/reference/android/app/Fragment#startActivityForResult(android.content.Intent,%20int)`.
` void` ` https://developer.android.com/reference/android/app/Fragment#onAttach(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) `

*This method was deprecated in API level 23. Use `https://developer.android.com/reference/android/app/Fragment#onAttach(android.content.Context)` instead.*
` void` ` https://developer.android.com/reference/android/app/Fragment#onAttach(android.content.Context)(https://developer.android.com/reference/android/content/Context context) `

Called when a fragment is first attached to its context.
` void` ` https://developer.android.com/reference/android/app/Fragment#onAttachFragment(android.app.Fragment)(https://developer.android.com/reference/android/app/Fragment childFragment) `

Called when a fragment is attached as a child of this fragment.
` void` ` https://developer.android.com/reference/android/app/Fragment#onConfigurationChanged(android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration newConfig) `

Called by the system when the device configuration changes while your component is running. If you override this method you *must* call through to the superclass implementation.
` boolean` ` https://developer.android.com/reference/android/app/Fragment#onContextItemSelected(android.view.MenuItem)(https://developer.android.com/reference/android/view/MenuItem item) `

This hook is called whenever an item in a context menu is selected.
` void` ` https://developer.android.com/reference/android/app/Fragment#onCreate(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle savedInstanceState) `

Called to do initial creation of a fragment.
` https://developer.android.com/reference/android/animation/Animator` ` https://developer.android.com/reference/android/app/Fragment#onCreateAnimator(int,%20boolean,%20int)(int transit, boolean enter, int nextAnim) `

Called when a fragment loads an animation.
` void` ` https://developer.android.com/reference/android/app/Fragment#onCreateContextMenu(android.view.ContextMenu,%20android.view.View,%20android.view.ContextMenu.ContextMenuInfo)(https://developer.android.com/reference/android/view/ContextMenu menu, https://developer.android.com/reference/android/view/View v, https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo menuInfo) `

Called when a context menu for the `view` is about to be shown.
` void` ` https://developer.android.com/reference/android/app/Fragment#onCreateOptionsMenu(android.view.Menu,%20android.view.MenuInflater)(https://developer.android.com/reference/android/view/Menu menu, https://developer.android.com/reference/android/view/MenuInflater inflater) `

Initialize the contents of the Activity's standard options menu.
` https://developer.android.com/reference/android/view/View` ` https://developer.android.com/reference/android/app/Fragment#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle)(https://developer.android.com/reference/android/view/LayoutInflater inflater, https://developer.android.com/reference/android/view/ViewGroup container, https://developer.android.com/reference/android/os/Bundle savedInstanceState) `

Called to have the fragment instantiate its user interface view.
` void` ` https://developer.android.com/reference/android/app/Fragment#onDestroy()() `

Called when the fragment is no longer in use.
` void` ` https://developer.android.com/reference/android/app/Fragment#onDestroyOptionsMenu()() `

Called when this fragment's option menu items are no longer being included in the overall options menu.
` void` ` https://developer.android.com/reference/android/app/Fragment#onDestroyView()() `

Called when the view previously created by `https://developer.android.com/reference/android/app/Fragment#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle)` has been detached from the fragment.
` void` ` https://developer.android.com/reference/android/app/Fragment#onDetach()() `

Called when the fragment is no longer attached to its activity.
` https://developer.android.com/reference/android/view/LayoutInflater` ` https://developer.android.com/reference/android/app/Fragment#onGetLayoutInflater(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle savedInstanceState) `

Returns the LayoutInflater used to inflate Views of this Fragment.
` void` ` https://developer.android.com/reference/android/app/Fragment#onHiddenChanged(boolean)(boolean hidden) `

Called when the hidden state (as returned by `https://developer.android.com/reference/android/app/Fragment#isHidden()` of the fragment has changed.
` void` ` https://developer.android.com/reference/android/app/Fragment#onInflate(android.util.AttributeSet,%20android.os.Bundle)(https://developer.android.com/reference/android/util/AttributeSet attrs, https://developer.android.com/reference/android/os/Bundle savedInstanceState) `

*This method was deprecated in API level 15. Use `https://developer.android.com/reference/android/app/Fragment#onInflate(android.content.Context,%20android.util.AttributeSet,%20android.os.Bundle)` instead.*
` void` ` https://developer.android.com/reference/android/app/Fragment#onInflate(android.app.Activity,%20android.util.AttributeSet,%20android.os.Bundle)(https://developer.android.com/reference/android/app/Activity activity, https://developer.android.com/reference/android/util/AttributeSet attrs, https://developer.android.com/reference/android/os/Bundle savedInstanceState) `

*This method was deprecated in API level 23. Use `https://developer.android.com/reference/android/app/Fragment#onInflate(android.content.Context,%20android.util.AttributeSet,%20android.os.Bundle)` instead.*
` void` ` https://developer.android.com/reference/android/app/Fragment#onInflate(android.content.Context,%20android.util.AttributeSet,%20android.os.Bundle)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/util/AttributeSet attrs, https://developer.android.com/reference/android/os/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` ` https://developer.android.com/reference/android/app/Fragment#onLowMemory()() `

This is called when the overall system is running low on memory, and actively running processes should trim their memory usage. If you override this method you *must* call through to the superclass implementation.
` void` ` https://developer.android.com/reference/android/app/Fragment#onMultiWindowModeChanged(boolean)(boolean isInMultiWindowMode) `

*This method was deprecated in API level 26. Use `https://developer.android.com/reference/android/app/Fragment#onMultiWindowModeChanged(boolean,%20android.content.res.Configuration)` instead.*
` void` ` https://developer.android.com/reference/android/app/Fragment#onMultiWindowModeChanged(boolean,%20android.content.res.Configuration)(boolean isInMultiWindowMode, https://developer.android.com/reference/android/content/res/Configuration newConfig) `

Called when the Fragment's activity changes from fullscreen mode to multi-window mode and visa-versa.
` boolean` ` https://developer.android.com/reference/android/app/Fragment#onOptionsItemSelected(android.view.MenuItem)(https://developer.android.com/reference/android/view/MenuItem item) `

This hook is called whenever an item in your options menu is selected.
` void` ` https://developer.android.com/reference/android/app/Fragment#onOptionsMenuClosed(android.view.Menu)(https://developer.android.com/reference/android/view/Menu menu) `

This hook is called whenever the options menu is being closed (either by the user canceling the menu with the back/menu button, or when an item is selected).
` void` ` https://developer.android.com/reference/android/app/Fragment#onPause()() `

Called when the Fragment is no longer resumed.
` void` ` https://developer.android.com/reference/android/app/Fragment#onPictureInPictureModeChanged(boolean,%20android.content.res.Configuration)(boolean isInPictureInPictureMode, https://developer.android.com/reference/android/content/res/Configuration newConfig) `

Called by the system when the activity changes to and from picture-in-picture mode.
` void` ` https://developer.android.com/reference/android/app/Fragment#onPictureInPictureModeChanged(boolean)(boolean isInPictureInPictureMode) `

*This method was deprecated in API level 26. Use `https://developer.android.com/reference/android/app/Fragment#onPictureInPictureModeChanged(boolean,%20android.content.res.Configuration)` instead.*
` void` ` https://developer.android.com/reference/android/app/Fragment#onPrepareOptionsMenu(android.view.Menu)(https://developer.android.com/reference/android/view/Menu menu) `

Prepare the Screen's standard options menu to be displayed.
` void` ` https://developer.android.com/reference/android/app/Fragment#onRequestPermissionsResult(int,%20java.lang.String[],%20int[])(int requestCode, https://developer.android.com/reference/java/lang/String permissions, int[] grantResults) `

Callback for the result from requesting permissions.
` void` ` https://developer.android.com/reference/android/app/Fragment#onResume()() `

Called when the fragment is visible to the user and actively running.
` void` ` https://developer.android.com/reference/android/app/Fragment#onSaveInstanceState(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle outState) `

Called to ask the fragment to save its current dynamic state, so it can later be reconstructed in a new instance of its process is restarted.
` void` ` https://developer.android.com/reference/android/app/Fragment#onStart()() `

Called when the Fragment is visible to the user.
` void` ` https://developer.android.com/reference/android/app/Fragment#onStop()() `

Called when the Fragment is no longer started.
` void` ` https://developer.android.com/reference/android/app/Fragment#onTrimMemory(int)(int level) `

Called when the operating system has determined that it is a good time for a process to trim unneeded memory from its process. If you override this method you *must* call through to the superclass implementation.
` void` ` https://developer.android.com/reference/android/app/Fragment#onViewCreated(android.view.View,%20android.os.Bundle)(https://developer.android.com/reference/android/view/View view, https://developer.android.com/reference/android/os/Bundle savedInstanceState) `

Called immediately after `https://developer.android.com/reference/android/app/Fragment#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle)` has returned, but before any saved state has been restored in to the view.
` void` ` https://developer.android.com/reference/android/app/Fragment#onViewStateRestored(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle savedInstanceState) `

Called when all saved state has been restored into the view hierarchy of the fragment.
` void` ` https://developer.android.com/reference/android/app/Fragment#postponeEnterTransition()() `

Postpone the entering Fragment transition until `https://developer.android.com/reference/android/app/Fragment#startPostponedEnterTransition()` or `https://developer.android.com/reference/android/app/FragmentManager#executePendingTransactions()` has been called.
` void` ` https://developer.android.com/reference/android/app/Fragment#registerForContextMenu(android.view.View)(https://developer.android.com/reference/android/view/View view) `

Registers a context menu to be shown for the given view (multiple views can show the context menu).
` final void` ` https://developer.android.com/reference/android/app/Fragment#requestPermissions(java.lang.String[],%20int)(https://developer.android.com/reference/java/lang/String permissions, int requestCode) `

Requests permissions to be granted to this application.
` void` ` https://developer.android.com/reference/android/app/Fragment#setAllowEnterTransitionOverlap(boolean)(boolean allow) `

Sets whether the exit transition and enter transition overlap or not.
` void` ` https://developer.android.com/reference/android/app/Fragment#setAllowReturnTransitionOverlap(boolean)(boolean allow) `

Sets whether the return transition and reenter transition overlap or not.
` void` ` https://developer.android.com/reference/android/app/Fragment#setArguments(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle args) `

Supply the construction arguments for this fragment.
` void` ` https://developer.android.com/reference/android/app/Fragment#setEnterSharedElementCallback(android.app.SharedElementCallback)(https://developer.android.com/reference/android/app/SharedElementCallback callback) `

When custom transitions are used with Fragments, the enter transition callback is called when this Fragment is attached or detached when not popping the back stack.
` void` ` https://developer.android.com/reference/android/app/Fragment#setEnterTransition(android.transition.Transition)(https://developer.android.com/reference/android/transition/Transition transition) `

Sets the Transition that will be used to move Views into the initial scene.
` void` ` https://developer.android.com/reference/android/app/Fragment#setExitSharedElementCallback(android.app.SharedElementCallback)(https://developer.android.com/reference/android/app/SharedElementCallback callback) `

When custom transitions are used with Fragments, the exit transition callback is called when this Fragment is attached or detached when popping the back stack.
` void` ` https://developer.android.com/reference/android/app/Fragment#setExitTransition(android.transition.Transition)(https://developer.android.com/reference/android/transition/Transition transition) `

Sets the Transition that will be used to move Views out of the scene when the fragment is removed, hidden, or detached when not popping the back stack.
` void` ` https://developer.android.com/reference/android/app/Fragment#setHasOptionsMenu(boolean)(boolean hasMenu) `

Report that this fragment would like to participate in populating the options menu by receiving a call to `https://developer.android.com/reference/android/app/Fragment#onCreateOptionsMenu(android.view.Menu,%20android.view.MenuInflater)` and related methods.
` void` ` https://developer.android.com/reference/android/app/Fragment#setInitialSavedState(android.app.Fragment.SavedState)(https://developer.android.com/reference/android/app/Fragment.SavedState state) `

Set the initial saved state that this Fragment should restore itself from when first being constructed, as returned by `https://developer.android.com/reference/android/app/FragmentManager#saveFragmentInstanceState(android.app.Fragment)`.
` void` ` https://developer.android.com/reference/android/app/Fragment#setMenuVisibility(boolean)(boolean menuVisible) `

Set a hint for whether this fragment's menu should be visible.
` void` ` https://developer.android.com/reference/android/app/Fragment#setReenterTransition(android.transition.Transition)(https://developer.android.com/reference/android/transition/Transition transition) `

Sets the Transition that will be used to move Views in to the scene when returning due to popping a back stack.
` void` ` https://developer.android.com/reference/android/app/Fragment#setRetainInstance(boolean)(boolean retain) `

Control whether a fragment instance is retained across Activity re-creation (such as from a configuration change).
` void` ` https://developer.android.com/reference/android/app/Fragment#setReturnTransition(android.transition.Transition)(https://developer.android.com/reference/android/transition/Transition transition) `

Sets the Transition that will be used to move Views out of the scene when the Fragment is preparing to be removed, hidden, or detached because of popping the back stack.
` void` ` https://developer.android.com/reference/android/app/Fragment#setSharedElementEnterTransition(android.transition.Transition)(https://developer.android.com/reference/android/transition/Transition transition) `

Sets the Transition that will be used for shared elements transferred into the content Scene.
` void` ` https://developer.android.com/reference/android/app/Fragment#setSharedElementReturnTransition(android.transition.Transition)(https://developer.android.com/reference/android/transition/Transition transition) `

Sets the Transition that will be used for shared elements transferred back during a pop of the back stack.
` void` ` https://developer.android.com/reference/android/app/Fragment#setTargetFragment(android.app.Fragment,%20int)(https://developer.android.com/reference/android/app/Fragment fragment, int requestCode) `

Optional target for this fragment.
` void` ` https://developer.android.com/reference/android/app/Fragment#setUserVisibleHint(boolean)(boolean isVisibleToUser) `

Set a hint to the system about whether this fragment's UI is currently visible to the user.
` boolean` ` https://developer.android.com/reference/android/app/Fragment#shouldShowRequestPermissionRationale(java.lang.String)(https://developer.android.com/reference/java/lang/String permission) `

Gets whether you should show UI with rationale before requesting a permission.
` void` ` https://developer.android.com/reference/android/app/Fragment#startActivity(android.content.Intent)(https://developer.android.com/reference/android/content/Intent intent) `

Call `https://developer.android.com/reference/android/app/Activity#startActivity(android.content.Intent)` from the fragment's containing Activity.
` void` ` https://developer.android.com/reference/android/app/Fragment#startActivity(android.content.Intent,%20android.os.Bundle)(https://developer.android.com/reference/android/content/Intent intent, https://developer.android.com/reference/android/os/Bundle options) `

Call `https://developer.android.com/reference/android/app/Activity#startActivity(android.content.Intent,%20android.os.Bundle)` from the fragment's containing Activity.
` void` ` https://developer.android.com/reference/android/app/Fragment#startActivityForResult(android.content.Intent,%20int)(https://developer.android.com/reference/android/content/Intent intent, int requestCode) `

Call `https://developer.android.com/reference/android/app/Activity#startActivityForResult(android.content.Intent,%20int)` from the fragment's containing Activity.
` void` ` https://developer.android.com/reference/android/app/Fragment#startActivityForResult(android.content.Intent,%20int,%20android.os.Bundle)(https://developer.android.com/reference/android/content/Intent intent, int requestCode, https://developer.android.com/reference/android/os/Bundle options) `

Call `https://developer.android.com/reference/android/app/Activity#startActivityForResult(android.content.Intent,%20int,%20android.os.Bundle)` from the fragment's containing Activity.
` void` ` https://developer.android.com/reference/android/app/Fragment#startIntentSenderForResult(android.content.IntentSender,%20int,%20android.content.Intent,%20int,%20int,%20int,%20android.os.Bundle)(https://developer.android.com/reference/android/content/IntentSender intent, int requestCode, https://developer.android.com/reference/android/content/Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, https://developer.android.com/reference/android/os/Bundle options) `

Call `https://developer.android.com/reference/android/app/Activity#startIntentSenderForResult(android.content.IntentSender,%20int,%20android.content.Intent,%20int,%20int,%20int,%20android.os.Bundle)` from the fragment's containing Activity.
` void` ` https://developer.android.com/reference/android/app/Fragment#startPostponedEnterTransition()() `

Begin postponed transitions after `https://developer.android.com/reference/android/app/Fragment#postponeEnterTransition()` was called.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/app/Fragment#toString()() `

Returns a string representation of the object.
` void` ` https://developer.android.com/reference/android/app/Fragment#unregisterForContextMenu(android.view.View)(https://developer.android.com/reference/android/view/View view) `

Prevents a context menu to be shown for the given view.
From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.
From interface ` https://developer.android.com/reference/android/content/ComponentCallbacks2 ` ` abstract void` ` https://developer.android.com/reference/android/content/ComponentCallbacks2#onTrimMemory(int)(int level) `

Called when the operating system has determined that it is a good time for a process to trim unneeded memory from its process.
From interface ` https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener ` ` abstract void` ` https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener#onCreateContextMenu(android.view.ContextMenu,%20android.view.View,%20android.view.ContextMenu.ContextMenuInfo)(https://developer.android.com/reference/android/view/ContextMenu menu, https://developer.android.com/reference/android/view/View v, https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo menuInfo) `

Called when the context menu for this view is being built.
From interface ` https://developer.android.com/reference/android/content/ComponentCallbacks ` ` abstract void` ` https://developer.android.com/reference/android/content/ComponentCallbacks#onConfigurationChanged(android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration newConfig) `

Called by the system when the device configuration changes while your component is running.
` abstract void` ` https://developer.android.com/reference/android/content/ComponentCallbacks#onLowMemory()() `

*This method was deprecated in API level 35. Since API level 14 this is superseded by `https://developer.android.com/reference/android/content/ComponentCallbacks2#onTrimMemory(int)`. Since API level 34 this is never called. If you're overriding ComponentCallbacks2#onTrimMemory and your minSdkVersion is greater than API 14, you can provide an empty implementation for this method.*

## Public constructors

### WebViewFragment

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WebViewFragment ()
```

<br />

<br />

## Public methods

### getWebView

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WebView getWebView ()
```

Gets the WebView.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/webkit/WebView` | <br /> |

### onCreateView

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View onCreateView (LayoutInflater inflater, 
                ViewGroup container, 
                Bundle savedInstanceState)
```

Called to instantiate the view. Creates and returns the WebView.

<br />

| Parameters ||
|---|---|
| `inflater` | `LayoutInflater`: The LayoutInflater object that can be used to inflate any views in the fragment, <br /> |
| `container` | `ViewGroup`: If non-null, this is the parent view that the fragment's UI should be attached to. The fragment should not add the view itself, but this can be used to generate the LayoutParams of the view. <br /> |
| `savedInstanceState` | `Bundle`: If non-null, this fragment is being re-constructed from a previous saved state as given here. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | Return the View for the fragment's UI, or null. <br /> |

### onDestroy

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onDestroy ()
```

Called when the fragment is no longer in use. Destroys the internal state of the WebView.

<br />

### onDestroyView

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onDestroyView ()
```

Called when the WebView has been detached from the fragment. The WebView is no longer available after this time.

<br />

### onPause

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onPause ()
```

Called when the fragment is visible to the user and actively running. Resumes the WebView.

<br />

### onResume

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onResume ()
```

Called when the fragment is no longer resumed. Pauses the WebView.

<br />