Packagecom.myflashlab.air.extensions.richWebView.android
Classpublic class WebSettings
InheritanceWebSettings Inheritance Object

Manages settings state for a WebView. When a WebView is first created, it obtains a set of default settings.



Public Properties
 PropertyDefined By
  allowContentAccess : Boolean
Gets whether this WebView supports content URL access.
WebSettings
  allowFileAccess : Boolean
Gets whether this WebView supports file access.
WebSettings
  allowFileAccessFromFileURLs : Boolean
Gets whether JavaScript running in the context of a file scheme URL can access content from other file scheme URLs.
WebSettings
  allowUniversalAccessFromFileURLs : Boolean
Gets whether JavaScript running in the context of a file scheme URL can access content from any origin.
WebSettings
  appCacheEnabled : Boolean
[write-only] Sets whether the Application Caches API should be enabled.
WebSettings
  appCachePath : String
[write-only] Sets the path to the Application Caches files.
WebSettings
  blockNetworkImage : Boolean
Gets whether the WebView does not load image resources from the network.
WebSettings
  blockNetworkLoads : Boolean
Gets whether the WebView does not load any resources from the network.
WebSettings
  builtInZoomControls : Boolean
Gets whether the zoom mechanisms built into WebView are being used.
WebSettings
  cacheMode : int
Gets the current setting for overriding the cache mode.
WebSettings
  cursiveFontFamily : String
Gets the cursive font family name.
WebSettings
  databaseEnabled : Boolean
Gets whether the database storage API is enabled.
WebSettings
  defaultFixedFontSize : int
Gets the default fixed font size.
WebSettings
  defaultFontSize : int
Gets the default font size.
WebSettings
  defaultTextEncodingName : String
Gets the default text encoding name.
WebSettings
  defaultUserAgent : String
[read-only] Returns the default User-Agent used by a WebView.
WebSettings
  displayZoomControls : Boolean
Gets whether the WebView displays on-screen zoom controls when using the built-in zoom mechanisms.
WebSettings
  domStorageEnabled : Boolean
Gets whether the DOM Storage APIs are enabled.
WebSettings
  fantasyFontFamily : String
Gets the fantasy font family name.
WebSettings
  fixedFontFamily : String
Gets the fixed font family name.
WebSettings
  geolocationEnabled : Boolean
Sets whether Geolocation is enabled.
WebSettings
  javaScriptEnabled : Boolean
Gets whether JavaScript is enabled.
WebSettings
  loadsImagesAutomatically : Boolean
Gets whether the WebView loads image resources.
WebSettings
  loadWithOverviewMode : Boolean
Gets whether this WebView loads pages in overview mode.
WebSettings
  mediaPlaybackRequiresUserGesture : Boolean
Gets whether the WebView requires a user gesture to play media.
WebSettings
  minimumFontSize : int
Sets the minimum font size.
WebSettings
  minimumLogicalFontSize : int
Sets the minimum logical font size.
WebSettings
  mixedContentMode : int
Configures the WebView's behavior when a secure origin attempts to load a resource from an insecure origin.
WebSettings
  offscreenPreRaster : Boolean
Sets whether this WebView should raster tiles when it is offscreen but attached to a window.
WebSettings
  safeBrowsingEnabled : Boolean
Sets whether Safe Browsing is enabled.
WebSettings
  sansSerifFontFamily : String
Gets the sans-serif font family name.
WebSettings
  saveFormData : Boolean
Sets whether the WebView should save form data.
WebSettings
  serifFontFamily : String
Gets the serif font family name.
WebSettings
  standardFontFamily : String
Gets the standard font family name.
WebSettings
  supportMultipleWindows : Boolean
[read-only] Gets whether the WebView supports multiple windows.
WebSettings
  supportZoom : Boolean
Sets whether the WebView should support zooming using its on-screen zoom controls and gestures.
WebSettings
  textZoom : int
Sets the text zoom of the page in percent.
WebSettings
  userAgentString : String
Gets the WebView's user-agent string.
WebSettings
  useWideViewPort : Boolean
Sets whether the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport.
WebSettings
Public Constants
 ConstantDefined By
  LOAD_CACHE_ELSE_NETWORK : int = 1
[static]
WebSettings
  LOAD_CACHE_ONLY : int = 3
[static]
WebSettings
  LOAD_DEFAULT : int = -1
[static]
WebSettings
  LOAD_NO_CACHE : int = 2
[static]
WebSettings
  LOAD_NORMAL : int = 0
[static]
WebSettings
  MIXED_CONTENT_ALWAYS_ALLOW : int = 0
[static]
WebSettings
  MIXED_CONTENT_COMPATIBILITY_MODE : int = 2
[static]
WebSettings
  MIXED_CONTENT_NEVER_ALLOW : int = 1
[static]
WebSettings
Property Detail
allowContentAccessproperty
allowContentAccess:Boolean

Gets whether this WebView supports content URL access. Enables or disables content URL access within WebView. Content URL access allows WebView to load content from a content provider installed in the system. The default is enabled.


Implementation
    public function get allowContentAccess():Boolean
    public function set allowContentAccess(value:Boolean):void
allowFileAccessproperty 
allowFileAccess:Boolean

Gets whether this WebView supports file access. Enables or disables file access within WebView. File access is enabled by default. Note that this enables or disables file system access only. Assets and resources are still accessible using file:///android_asset and file:///android_res.


Implementation
    public function get allowFileAccess():Boolean
    public function set allowFileAccess(value:Boolean):void
allowFileAccessFromFileURLsproperty 
allowFileAccessFromFileURLs:Boolean

Gets whether JavaScript running in the context of a file scheme URL can access content from other file scheme URLs.

Sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from other file scheme URLs. To enable the most restrictive, and therefore secure, policy this setting should be disabled. Note that the value of this setting is ignored if the value of allowUniversalAccessFromFileURLs() is true. Note too, that this setting affects only JavaScript access to file scheme resources. Other access to such resources, for example, from image HTML elements, is unaffected. To prevent possible violation of same domain policy when targeting Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1 and earlier, you should explicitly set this value to false.

The default value is true for apps targeting Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1 and below, and false when targeting Build.VERSION_CODES.JELLY_BEAN and above.


Implementation
    public function get allowFileAccessFromFileURLs():Boolean
    public function set allowFileAccessFromFileURLs(value:Boolean):void
allowUniversalAccessFromFileURLsproperty 
allowUniversalAccessFromFileURLs:Boolean

Gets whether JavaScript running in the context of a file scheme URL can access content from any origin. This includes access to content from other file scheme URLs.

Sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from any origin. This includes access to content from other file scheme URLs. See allowFileAccessFromFileURLs(boolean). To enable the most restrictive, and therefore secure policy, this setting should be disabled. Note that this setting affects only JavaScript access to file scheme resources. Other access to such resources, for example, from image HTML elements, is unaffected. To prevent possible violation of same domain policy when targeting Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1 and earlier, you should explicitly set this value to false.

The default value is true for apps targeting Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1 and below, and false when targeting Build.VERSION_CODES.JELLY_BEAN and above.


Implementation
    public function get allowUniversalAccessFromFileURLs():Boolean
    public function set allowUniversalAccessFromFileURLs(value:Boolean):void
appCacheEnabledproperty 
appCacheEnabled:Boolean  [write-only]

Sets whether the Application Caches API should be enabled. The default is false. Note that in order for the Application Caches API to be enabled, a valid database path must also be supplied to appCachePath(String).


Implementation
    public function set appCacheEnabled(value:Boolean):void
appCachePathproperty 
appCachePath:String  [write-only]

Sets the path to the Application Caches files. In order for the Application Caches API to be enabled, this method must be called with a path to which the application can write. This method should only be called once: repeated calls are ignored.


Implementation
    public function set appCachePath(value:String):void
blockNetworkImageproperty 
blockNetworkImage:Boolean

Gets whether the WebView does not load image resources from the network. Sets whether the WebView should not load image resources from the network (resources accessed via http and https URI schemes). Note that this method has no effect unless loadsImagesAutomatically() returns true. Also note that disabling all network loads using blockNetworkLoads(boolean) will also prevent network images from loading, even if this flag is set to false. When the value of this setting is changed from true to false, network images resources referenced by content currently displayed by the WebView are fetched automatically. The default is false.


Implementation
    public function get blockNetworkImage():Boolean
    public function set blockNetworkImage(value:Boolean):void
blockNetworkLoadsproperty 
blockNetworkLoads:Boolean

Gets whether the WebView does not load any resources from the network. Sets whether the WebView should not load resources from the network. Use BlockNetworkImage(boolean) to only avoid loading image resources. Note that if the value of this setting is changed from true to false, network resources referenced by content currently displayed by the WebView are not fetched until WebView.reload() is called.


Implementation
    public function get blockNetworkLoads():Boolean
    public function set blockNetworkLoads(value:Boolean):void
builtInZoomControlsproperty 
builtInZoomControls:Boolean

Gets whether the zoom mechanisms built into WebView are being used. Sets whether the WebView should use its built-in zoom mechanisms. The built-in zoom mechanisms comprise on-screen zoom controls, which are displayed over the WebView's content, and the use of a pinch gesture to control zooming. Whether or not these on-screen controls are displayed can be set with setDisplayZoomControls(boolean). The default is false.

The built-in mechanisms are the only currently supported zoom mechanisms, so it is recommended that this setting is always enabled.


Implementation
    public function get builtInZoomControls():Boolean
    public function set builtInZoomControls(value:Boolean):void
cacheModeproperty 
cacheMode:int

Gets the current setting for overriding the cache mode. Overrides the way the cache is used. The way the cache is used is based on the navigation type. For a normal page load, the cache is checked and content is re-validated as needed. When navigating back, content is not revalidated, instead the content is just retrieved from the cache. This method allows the client to override this behavior by specifying one of LOAD_DEFAULT, LOAD_CACHE_ELSE_NETWORK, LOAD_NO_CACHE or LOAD_CACHE_ONLY. The default value is LOAD_DEFAULT.


Implementation
    public function get cacheMode():int
    public function set cacheMode(value:int):void
cursiveFontFamilyproperty 
cursiveFontFamily:String

Gets the cursive font family name. The default is "cursive".


Implementation
    public function get cursiveFontFamily():String
    public function set cursiveFontFamily(value:String):void
databaseEnabledproperty 
databaseEnabled:Boolean

Gets whether the database storage API is enabled. The default value is false. This setting is global in effect, across all WebView instances in a process. Note you should only modify this setting prior to making any WebView page load within a given process, as the WebView implementation may ignore changes to this setting after that point.


Implementation
    public function get databaseEnabled():Boolean
    public function set databaseEnabled(value:Boolean):void
defaultFixedFontSizeproperty 
defaultFixedFontSize:int

Gets the default fixed font size. The default is 16.


Implementation
    public function get defaultFixedFontSize():int
    public function set defaultFixedFontSize(value:int):void
defaultFontSizeproperty 
defaultFontSize:int

Gets the default font size. The default is 16.


Implementation
    public function get defaultFontSize():int
    public function set defaultFontSize(value:int):void
defaultTextEncodingNameproperty 
defaultTextEncodingName:String

Gets the default text encoding name. The default is "UTF-8".


Implementation
    public function get defaultTextEncodingName():String
    public function set defaultTextEncodingName(value:String):void
defaultUserAgentproperty 
defaultUserAgent:String  [read-only]

Returns the default User-Agent used by a WebView. An instance of WebView could use a different User-Agent with userAgentString


Implementation
    public function get defaultUserAgent():String
displayZoomControlsproperty 
displayZoomControls:Boolean

Gets whether the WebView displays on-screen zoom controls when using the built-in zoom mechanisms. Sets whether the WebView should display on-screen zoom controls when using the built-in zoom mechanisms. See builtInZoomControls(boolean). The default is true.


Implementation
    public function get displayZoomControls():Boolean
    public function set displayZoomControls(value:Boolean):void
domStorageEnabledproperty 
domStorageEnabled:Boolean

Gets whether the DOM Storage APIs are enabled. Sets whether the DOM storage API is enabled. The default value is false.


Implementation
    public function get domStorageEnabled():Boolean
    public function set domStorageEnabled(value:Boolean):void
fantasyFontFamilyproperty 
fantasyFontFamily:String

Gets the fantasy font family name. The default is "fantasy".


Implementation
    public function get fantasyFontFamily():String
    public function set fantasyFontFamily(value:String):void
fixedFontFamilyproperty 
fixedFontFamily:String

Gets the fixed font family name. The default is "monospace".


Implementation
    public function get fixedFontFamily():String
    public function set fixedFontFamily(value:String):void
geolocationEnabledproperty 
geolocationEnabled:Boolean

Sets whether Geolocation is enabled. The default is true.


Implementation
    public function get geolocationEnabled():Boolean
    public function set geolocationEnabled(value:Boolean):void
javaScriptEnabledproperty 
javaScriptEnabled:Boolean

Gets whether JavaScript is enabled. Tells the WebView to enable JavaScript execution. The default is false.


Implementation
    public function get javaScriptEnabled():Boolean
    public function set javaScriptEnabled(value:Boolean):void
loadsImagesAutomaticallyproperty 
loadsImagesAutomatically:Boolean

Gets whether the WebView loads image resources. This includes images embedded using the data URI scheme.

Sets whether the WebView should load image resources. Note that this method controls loading of all images, including those embedded using the data URI scheme. Use blockNetworkImage(boolean) to control loading only of images specified using network URI schemes. Note that if the value of this setting is changed from false to true, all images resources referenced by content currently displayed by the WebView are loaded automatically. The default is true.


Implementation
    public function get loadsImagesAutomatically():Boolean
    public function set loadsImagesAutomatically(value:Boolean):void
loadWithOverviewModeproperty 
loadWithOverviewMode:Boolean

Gets whether this WebView loads pages in overview mode. Sets whether the WebView loads pages in overview mode, that is, zooms out the content to fit on screen by width. This setting is taken into account when the content width is greater than the width of the WebView control, for example, when useWideViewPort() is enabled. The default is false.


Implementation
    public function get loadWithOverviewMode():Boolean
    public function set loadWithOverviewMode(value:Boolean):void
mediaPlaybackRequiresUserGestureproperty 
mediaPlaybackRequiresUserGesture:Boolean

Gets whether the WebView requires a user gesture to play media. Sets whether the WebView requires a user gesture to play media. The default is true.


Implementation
    public function get mediaPlaybackRequiresUserGesture():Boolean
    public function set mediaPlaybackRequiresUserGesture(value:Boolean):void
minimumFontSizeproperty 
minimumFontSize:int

Sets the minimum font size. The default is 8.


Implementation
    public function get minimumFontSize():int
    public function set minimumFontSize(value:int):void
minimumLogicalFontSizeproperty 
minimumLogicalFontSize:int

Sets the minimum logical font size. The default is 8.


Implementation
    public function get minimumLogicalFontSize():int
    public function set minimumLogicalFontSize(value:int):void
mixedContentModeproperty 
mixedContentMode:int

Configures the WebView's behavior when a secure origin attempts to load a resource from an insecure origin. By default, apps that target Build.VERSION_CODES.KITKAT or below default to MIXED_CONTENT_ALWAYS_ALLOW. Apps targeting Build.VERSION_CODES.LOLLIPOP default to MIXED_CONTENT_NEVER_ALLOW. The preferred and most secure mode of operation for the WebView is MIXED_CONTENT_NEVER_ALLOW and use of MIXED_CONTENT_ALWAYS_ALLOW is strongly discouraged.


Implementation
    public function get mixedContentMode():int
    public function set mixedContentMode(value:int):void
offscreenPreRasterproperty 
offscreenPreRaster:Boolean

Sets whether this WebView should raster tiles when it is offscreen but attached to a window. Turning this on can avoid rendering artifacts when animating an offscreen WebView on-screen. Offscreen WebViews in this mode use more memory. The default value is false. Please follow these guidelines to limit memory usage:


Implementation
    public function get offscreenPreRaster():Boolean
    public function set offscreenPreRaster(value:Boolean):void
safeBrowsingEnabledproperty 
safeBrowsingEnabled:Boolean

Sets whether Safe Browsing is enabled. Safe Browsing allows WebView to protect against malware and phishing attacks by verifying the links.

Safe Browsing can be disabled for all WebViews using a manifest tag (read general Safe Browsing info). The manifest tag has a lower precedence than this API.

Safe Browsing is enabled by default for devices which support it.


Implementation
    public function get safeBrowsingEnabled():Boolean
    public function set safeBrowsingEnabled(value:Boolean):void
sansSerifFontFamilyproperty 
sansSerifFontFamily:String

Gets the sans-serif font family name. The default is "sans-serif".


Implementation
    public function get sansSerifFontFamily():String
    public function set sansSerifFontFamily(value:String):void
saveFormDataproperty 
saveFormData:Boolean

Sets whether the WebView should save form data. In Android O, the platform has implemented a fully functional Autofill feature to store form data. Therefore, the Webview form data save feature is disabled. Note that the feature will continue to be supported on older versions of Android as before. This function does not have any effect.


Implementation
    public function get saveFormData():Boolean
    public function set saveFormData(value:Boolean):void
serifFontFamilyproperty 
serifFontFamily:String

Gets the serif font family name. The default is "serif".


Implementation
    public function get serifFontFamily():String
    public function set serifFontFamily(value:String):void
standardFontFamilyproperty 
standardFontFamily:String

Gets the standard font family name. The default is "sans-serif".


Implementation
    public function get standardFontFamily():String
    public function set standardFontFamily(value:String):void
supportMultipleWindowsproperty 
supportMultipleWindows:Boolean  [read-only]

Gets whether the WebView supports multiple windows. As an ANE, this always returns false!


Implementation
    public function get supportMultipleWindows():Boolean
supportZoomproperty 
supportZoom:Boolean

Sets whether the WebView should support zooming using its on-screen zoom controls and gestures. The particular zoom mechanisms that should be used can be set with builtInZoomControls(boolean). This setting does not affect zooming performed using the WebView.zoomIn() and WebView.zoomOut() methods. The default is true.


Implementation
    public function get supportZoom():Boolean
    public function set supportZoom(value:Boolean):void
textZoomproperty 
textZoom:int

Sets the text zoom of the page in percent. The default is 100.


Implementation
    public function get textZoom():int
    public function set textZoom(value:int):void
userAgentStringproperty 
userAgentString:String

Gets the WebView's user-agent string. Sets the WebView's user-agent string. If the string is null or empty, the system default value will be used. Note that starting from Build.VERSION_CODES.KITKAT Android version, changing the user-agent while loading a web page causes WebView to initiate loading once again.


Implementation
    public function get userAgentString():String
    public function set userAgentString(value:String):void
useWideViewPortproperty 
useWideViewPort:Boolean

Sets whether the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport. When the value of the setting is false, the layout width is always set to the width of the WebView control in device-independent (CSS) pixels. When the value is true and the page contains the viewport meta tag, the value of the width specified in the tag is used. If the page does not contain the tag or does not provide a width, then a wide viewport will be used.


Implementation
    public function get useWideViewPort():Boolean
    public function set useWideViewPort(value:Boolean):void
Constant Detail
LOAD_CACHE_ELSE_NETWORKConstant
public static const LOAD_CACHE_ELSE_NETWORK:int = 1

LOAD_CACHE_ONLYConstant 
public static const LOAD_CACHE_ONLY:int = 3

LOAD_DEFAULTConstant 
public static const LOAD_DEFAULT:int = -1

LOAD_NO_CACHEConstant 
public static const LOAD_NO_CACHE:int = 2

LOAD_NORMALConstant 
public static const LOAD_NORMAL:int = 0

MIXED_CONTENT_ALWAYS_ALLOWConstant 
public static const MIXED_CONTENT_ALWAYS_ALLOW:int = 0

MIXED_CONTENT_COMPATIBILITY_MODEConstant 
public static const MIXED_CONTENT_COMPATIBILITY_MODE:int = 2

MIXED_CONTENT_NEVER_ALLOWConstant 
public static const MIXED_CONTENT_NEVER_ALLOW:int = 1