# Print output for @column tags ?> WebViewFragment - Android SDK | Android Developers

Most visited


Recently visited


WebViewFragment

public class WebViewFragment
extends Fragment

java.lang.Object
   ↳ android.app.Fragment
     ↳ android.webkit.WebViewFragment


This class is deprecated.
Manually call WebView#onPause() and 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

Inherited constants

Public constructors

WebViewFragment()

Public methods

WebView getWebView()

Gets the WebView.

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

Called to instantiate the view.

void onDestroy()

Called when the fragment is no longer in use.

void onDestroyView()

Called when the WebView has been detached from the fragment.

void onPause()

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

void onResume()

Called when the fragment is no longer resumed.

Inherited methods

Public constructors


WebViewFragment

public WebViewFragment ()

Public methods


getWebView

public WebView getWebView ()

Gets the WebView.

Returns
WebView

onCreateView

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

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. This value may be null.

savedInstanceState Bundle: If non-null, this fragment is being re-constructed from a previous saved state as given here.

Returns
View Return the View for the fragment's UI, or null.

onDestroy

public void onDestroy ()

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

onDestroyView

public void onDestroyView ()

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

onPause

public void onPause ()

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

onResume

public void onResume ()

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

Browse this site in English?

You requested a page in English, but your language preference for this site is English.

Would you like to change your language preference and browse this site in English? If you want to change your language preference later, use the language menu at the bottom of each page.