WebView.SetInitialScale(Int32) Method
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.
Sets the initial scale for this WebView.
[Android.Runtime.Register("setInitialScale", "(I)V", "GetSetInitialScale_IHandler")]
public virtual void SetInitialScale (int scaleInPercent);
[<Android.Runtime.Register("setInitialScale", "(I)V", "GetSetInitialScale_IHandler")>]
abstract member SetInitialScale : int -> unit
override this.SetInitialScale : int -> unit
Parameters
- scaleInPercent
- Int32
the initial scale in percent
- Attributes
Remarks
Sets the initial scale for this WebView. 0 means default. The behavior for the default scale depends on the state of WebSettings#getUseWideViewPort()
and WebSettings#getLoadWithOverviewMode()
. If the content fits into the WebView control by width, then the zoom is set to 100%. For wide content, the behavior depends on the state of WebSettings#getLoadWithOverviewMode()
. If its value is true
, the content will be zoomed out to be fit by width into the WebView control, otherwise not.
If initial scale is greater than 0, WebView starts with this value as initial scale. Please note that unlike the scale properties in the viewport meta tag, this method doesn't take the screen density into account.
Java documentation for android.webkit.WebView.setInitialScale(int)
.
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.