WebSettings Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Manages settings state for a WebView.
[Android.Runtime.Register("android/webkit/WebSettings", DoNotGenerateAcw=true)]
public abstract class WebSettings : Java.Lang.Object
[<Android.Runtime.Register("android/webkit/WebSettings", DoNotGenerateAcw=true)>]
type WebSettings = class
inherit Object
- Inheritance
- Attributes
Remarks
Manages settings state for a WebView. When a WebView is first created, it obtains a set of default settings. These default settings will be returned from any getter call. A WebSettings
object obtained from WebView#getSettings()
is tied to the life of the WebView. If a WebView has been destroyed, any method call on WebSettings
will throw an IllegalStateException
.
Java documentation for android.webkit.WebSettings
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
WebSettings() | |
WebSettings(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Fields
ForceDarkAuto |
Enable force dark dependent on the state of the WebView parent view. |
ForceDarkOff |
Disable force dark, irrespective of the force dark mode of the WebView parent. |
ForceDarkOn |
Unconditionally enable force dark. |
MenuItemNone |
Obsolete.
No menu items should be disabled. |
MenuItemProcessText |
Obsolete.
Disable all the action mode menu items for text processing. |
MenuItemShare |
Obsolete.
Disable menu item "Share". |
MenuItemWebSearch |
Obsolete.
Disable menu item "Web Search". |
MixedContentAlwaysAllow |
Obsolete.
In this mode, the WebView will allow a secure origin to load content from any other origin, even if that origin is insecure. |
MixedContentCompatibilityMode |
Obsolete.
In this mode, the WebView will attempt to be compatible with the approach of a modern web browser with regard to mixed content. |
MixedContentNeverAllow |
Obsolete.
In this mode, the WebView will not allow a secure origin to load content from an insecure origin. |
Properties
AlgorithmicDarkeningAllowed |
Get if algorithmic darkening is allowed or not for this WebView. -or- Control whether algorithmic darkening is allowed. |
AllowContentAccess |
Gets whether this WebView supports content URL access. |
AllowFileAccess |
Gets whether this WebView supports file access. |
AllowFileAccessFromFileURLs |
Gets whether JavaScript running in the context of a file scheme URL can access content from other file scheme URLs. |
AllowUniversalAccessFromFileURLs |
Gets whether JavaScript running in the context of a file scheme URL can access content from any origin. |
BlockNetworkImage |
Gets whether the WebView does not load image resources from the network. |
BlockNetworkLoads |
Gets whether the WebView does not load any resources from the network. |
BuiltInZoomControls |
Gets whether the zoom mechanisms built into WebView are being used. |
CacheMode |
Gets the current setting for overriding the cache mode. |
Class |
Returns the runtime class of this |
CursiveFontFamily |
Gets the cursive font family name. |
DatabaseEnabled |
Gets whether the database storage API is enabled. |
DatabasePath |
Gets the path to where database storage API databases are saved. |
DefaultFixedFontSize |
Gets the default fixed font size. |
DefaultFontSize |
Gets the default font size. |
DefaultTextEncodingName |
Gets the default text encoding name. |
DefaultZoom |
Gets the default zoom density of the page. |
DisabledActionModeMenuItems | |
DisplayZoomControls |
Gets whether the WebView displays on-screen zoom controls when using the built-in zoom mechanisms. |
DomStorageEnabled |
Gets whether the DOM Storage APIs are enabled. |
FantasyFontFamily |
Gets the fantasy font family name. |
FixedFontFamily |
Gets the fixed font family name. |
ForceDark |
Get the force dark mode for this WebView. -or- Set the force dark mode for this WebView. |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
JavaScriptCanOpenWindowsAutomatically |
Gets whether JavaScript can open windows automatically. |
JavaScriptEnabled |
Gets whether JavaScript is enabled. |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
LightTouchEnabled |
Gets whether light touches are enabled. |
LoadsImagesAutomatically |
Gets whether the WebView loads image resources. |
LoadWithOverviewMode |
Gets whether this WebView loads pages in overview mode. |
MediaPlaybackRequiresUserGesture |
Gets whether the WebView requires a user gesture to play media. |
MinimumFontSize |
Gets the minimum font size. |
MinimumLogicalFontSize |
Gets the minimum logical font size. |
MixedContentMode |
Gets the current behavior of the WebView with regard to loading insecure content from a secure origin. |
NavDump |
Obsolete.
Gets whether dumping the navigation cache is enabled. -or- Enables dumping the pages navigation cache to a text file. |
OffscreenPreRaster | |
PeerReference | (Inherited from Object) |
PluginsEnabled |
Obsolete.
Gets whether plugins are enabled. -or- Sets whether the WebView should enable plugins. |
PluginsPath |
Obsolete.
Gets the directory that contains the plugin libraries. -or- Sets a custom path to plugins used by the WebView. |
SafeBrowsingEnabled | |
SansSerifFontFamily |
Gets the sans-serif font family name. |
SaveFormData |
Gets whether the WebView saves form data. |
SavePassword |
Gets whether the WebView saves passwords. |
SerifFontFamily |
Gets the serif font family name. |
StandardFontFamily |
Gets the standard font family name. |
TextZoom |
Gets the text zoom of the page in percent. |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
UseDoubleTree |
Obsolete.
Controlled a rendering optimization that is no longer present. -or- Controlled a rendering optimization that is no longer present. |
UserAgent |
Obsolete.
Gets the user-agent as an integer code. -or- Sets the user-agent string using an integer code. |
UserAgentString |
Gets the WebView's user-agent string. |
UseWebViewBackgroundForOverscrollBackground |
Obsolete.
Gets whether this WebView uses WebView's background instead of internal pattern for over scroll background. -or- Sets whether the WebView uses its background for over scroll background. |
UseWideViewPort |
Gets whether the WebView supports the "viewport" HTML meta tag or will use a wide viewport. |
Methods
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
EnableSmoothTransition() |
Obsolete.
Gets whether the WebView enables smooth transition while panning or zooming. |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
GetDefaultUserAgent(Context) |
Returns the default User-Agent used by a WebView. |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetLayoutAlgorithm() |
Gets the current layout algorithm. |
GetPluginState() |
Obsolete.
Gets the current state regarding whether plugins are enabled. |
GetTextSize() |
Obsolete.
Gets the text size of the page. |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
SetAppCacheEnabled(Boolean) |
Sets whether the Application Caches API should be enabled. |
SetAppCacheMaxSize(Int64) |
Obsolete.
Sets the maximum size for the Application Cache content. |
SetAppCachePath(String) |
Sets the path to the Application Caches files. |
SetEnableSmoothTransition(Boolean) |
Obsolete.
Sets whether the WebView will enable smooth transition while panning or zooming or while the window hosting the WebView does not have focus. |
SetGeolocationDatabasePath(String) |
Sets the path where the Geolocation databases should be saved. |
SetGeolocationEnabled(Boolean) |
Sets whether Geolocation is enabled. |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
SetLayoutAlgorithm(WebSettings+LayoutAlgorithm) |
Sets the underlying layout algorithm. |
SetNeedInitialFocus(Boolean) |
Tells the WebView whether it needs to set a node to have focus when
|
SetPluginState(WebSettings+PluginState) |
Obsolete.
Tells the WebView to enable, disable, or have plugins on demand. |
SetRenderPriority(WebSettings+RenderPriority) |
Obsolete.
Sets the priority of the Render thread. |
SetSupportMultipleWindows(Boolean) |
Sets whether the WebView whether supports multiple windows. |
SetSupportZoom(Boolean) |
Sets whether the WebView should support zooming using its on-screen zoom controls and gestures. |
SetTextSize(WebSettings+TextSize) |
Obsolete.
Sets the text size of the page. |
SupportMultipleWindows() |
Gets whether the WebView supports multiple windows. |
SupportZoom() |
Gets whether the WebView supports zoom. |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnregisterFromRuntime() | (Inherited from Object) |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |