WebSettingsCompat

public class WebSettingsCompat
extends Object

java.lang.Object
   ↳ androidx.webkit.WebSettingsCompat


Compatibility version of WebSettings

Summary

Constants

int DARK_STRATEGY_PREFER_WEB_THEME_OVER_USER_AGENT_DARKENING

In this mode WebView content will be darkened by a user agent unless web page supports dark theme.

int DARK_STRATEGY_USER_AGENT_DARKENING_ONLY

In this mode WebView content will be darkened by a user agent and it will ignore the web page's dark theme if it exists.

int DARK_STRATEGY_WEB_THEME_DARKENING_ONLY

In this mode WebView content will always be darkened using dark theme provided by web page.

int FORCE_DARK_AUTO

Enable force dark dependent on the state of the WebView parent view.

int FORCE_DARK_OFF

Disable force dark, irrespective of the force dark mode of the WebView parent.

int FORCE_DARK_ON

Unconditionally enable force dark.

Public methods

static int getDisabledActionModeMenuItems(WebSettings settings)

Gets the action mode menu items that are disabled, expressed in an integer field flag.

static int getForceDark(WebSettings settings)

Get the force dark mode for this WebView.

static int getForceDarkStrategy(WebSettings settings)

Get how content is darkened for this WebView.

static boolean getOffscreenPreRaster(WebSettings settings)

Gets whether this WebView should raster tiles when it is offscreen but attached to a window.

static boolean getSafeBrowsingEnabled(WebSettings settings)

Gets whether Safe Browsing is enabled.

static void setDisabledActionModeMenuItems(WebSettings settings, int menuItems)

Disables the action mode menu items according to menuItems flag.

static void setForceDark(WebSettings settings, int forceDarkMode)

Set the force dark mode for this WebView.

static void setForceDarkStrategy(WebSettings settings, int forceDarkBehavior)

Set how WebView content should be darkened.

static void