public class XWalkSettings
extends java.lang.Object
| Constructor and Description |
|---|
XWalkSettings(java.lang.Object bridge) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAcceptLanguages()
Get the accept languages of XWalkView.
|
boolean |
getBuiltInZoomControls()
Gets whether the zoom mechanisms built into XWalkView are being used.
|
int |
getDefaultFixedFontSize()
Gets the default fixed font size.
|
int |
getDefaultFontSize()
Gets the default font size.
|
int |
getTextZoom()
Gets the text zoom of the page in percent.
|
java.lang.String |
getUserAgentString()
Get the user agent of web page/app.
|
boolean |
getUseWideViewPort()
Gets whether the XWalkView supports the "viewport" HTML meta tag or will
use a wide viewport.
|
void |
setAcceptLanguages(java.lang.String acceptLanguages)
Set the accept languages of XWalkView.
|
void |
setBuiltInZoomControls(boolean enabled)
Sets whether the XWalkView should use its built-in zoom mechanisms.
|
void |
setDefaultFixedFontSize(int size)
Sets the default fixed font size.
|
void |
setDefaultFontSize(int size)
Sets the default font size.
|
void |
setInitialPageScale(float scaleInPercent)
Sets the initial scale for this XWalkView.
|
void |
setSupportZoom(boolean support)
Sets whether the XWalkView should support zooming using its on-screen zoom controls
and gestures.
|
void |
setTextZoom(int textZoom)
Sets the text zoom of the page in percent.
|
void |
setUserAgentString(java.lang.String userAgent)
Set the user agent of web page/app.
|
void |
setUseWideViewPort(boolean use)
Sets whether the XWalkView should enable support for the "viewport" HTML
meta tag or should use a wide viewport.
|
boolean |
supportsMultiTouchZoomForTest()
Note: Just for test case.
|
boolean |
supportZoom()
Gets whether the XWalkView supports zoom.
|
public void setUseWideViewPort(boolean use)
use - whether to enable support for the viewport meta tag.public boolean getUseWideViewPort()
public void setUserAgentString(java.lang.String userAgent)
userAgent - the user agent string passed from client.public java.lang.String getUserAgentString()
public void setAcceptLanguages(java.lang.String acceptLanguages)
acceptLanguages - the accept languages string passed from client.public java.lang.String getAcceptLanguages()
public void setInitialPageScale(float scaleInPercent)
scaleInPercent - the initial scale in percent.public void setTextZoom(int textZoom)
textZoom - the text zoom in percent.public int getTextZoom()
public void setDefaultFontSize(int size)
size - non-negative integer between 1 and 72.
Any number outside the specified range will be pinned.public int getDefaultFontSize()
public void setDefaultFixedFontSize(int size)
size - a non-negative integer between 1 and 72.
Any number outside the specified range will be pinned.public int getDefaultFixedFontSize()
public void setSupportZoom(boolean support)
support - whether the XWalkView should support zoom.public boolean supportZoom()
public void setBuiltInZoomControls(boolean enabled)
enabled - whether the XWalkView should use its built-in zoom mechanisms.public boolean getBuiltInZoomControls()
public boolean supportsMultiTouchZoomForTest()