Added in API level 11
Deprecated in API level 28

WebViewFragment

open class WebViewFragment : Fragment
kotlin.Any
   ↳ android.app.Fragment
   ↳ android.webkit.WebViewFragment

A fragment that displays a WebView.

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

Summary

Inherited constants
Public constructors

Public methods
open WebView!

Gets the WebView.

open View?
onCreateView(inflater: LayoutInflater!, container: ViewGroup?, savedInstanceState: Bundle!)

Called to instantiate the view.

open Unit

Called when the fragment is no longer in use.

open Unit

Called when the WebView has been detached from the fragment.

open Unit

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

open Unit

Called when the fragment is no longer resumed.

Inherited functions

Public constructors

WebViewFragment

Added in API level 11
WebViewFragment()

Public methods

getWebView

Added in API level 11
open fun getWebView(): WebView!

Deprecated: Deprecated in Java.

Gets the WebView.

onCreateView

Added in API level 11
open fun onCreateView(
    inflater: LayoutInflater!,
    container: ViewGroup?,
    savedInstanceState: Bundle!
): View?

Deprecated: Deprecated in Java.

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

Parameters
inflater LayoutInflater!: The LayoutInflater object that can be used to inflate any views in the fragment,
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.
savedInstanceState Bundle!: If non-null, this fragment is being re-constructed from a previous saved state as given here.
Return
View? Return the View for the fragment's UI, or null.

onDestroy

Added in API level 11
open fun onDestroy(): Unit

Deprecated: Deprecated in Java.

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

onDestroyView

Added in API level 11
open fun onDestroyView(): Unit

Deprecated: Deprecated in Java.

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

onPause

Added in API level 11
open fun onPause(): Unit

Deprecated: Deprecated in Java.

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

onResume

Added in API level 11
open fun onResume(): Unit

Deprecated: Deprecated in Java.

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