<preference>
關於這個標簽的可用設置有:
- DisallowOverscroll 布爾值,默認false。如果不想要WebView出現橡皮筋滾動條,則設置為true
- TopActivityIndicator 字符串值,默認gray。設置頂部狀態欄的風格:whiteLarge, white, gray
- EnableLocation 布爾值, 默認false。 設置為true,初始化gps定位插件。請設置Geolocation插件的onload屬性為true。
- EnableViewportScale 布爾值,默認false。設置為true,以防止通過meta標簽來預設viewport縮放。
- AutoHideSplashScreen 布爾值,默認true。設置為false,以控制啟動畫面由通過javascript API來隱藏。
- FadeSplashScreen 布爾值,默認為true。設置為false,禁止啟動畫面淡入或淡出效果。
- FadeSplashScreenDuration 浮點數,默認為2(秒)。啟動畫面淡入淡出時間。
- ShowSplashScreenSpinner 布爾值,默認為true。設置為false,則隱藏splash-screen spinner。
- MediaPlaybackRequiresUserAction 布爾值,默認為false。設置為true,則不允許HTML5 video自動播放。
- AllowInlineMediaPlayback 布爾值,默認為false。 設置為true,則允許內聯HTML5 media playback。即,在HTML文檔的video元素也必須含有webkit-playsinline屬性。
- BackupWebStorage 字符串值,默認為cloud。有效的設置值有:none、local和cloud。
- KeyboardDisplayRequiresUserAction 布爾值,默認為true。 設置為false以打開鍵盤,在通過Javascript focus()聚焦表單元素時。
- SuppressesIncrementalRendering 布爾值, 默認為false。 設置為true,在被渲染之前一直等待,直到所有新視圖內容已經接收到。
- HideKeyboardFormAccessoryBar 布爾值,默認為false。 設置為true,隱藏鍵盤頂部的其他工具欄按鈕,如Prev, Next, Done。
- KeyboardShrinksView 布爾值,默認為false。 設置為true,則當鍵盤出現在上面時,收縮WebView。The WebView shrinks instead of the viewport shrinking and the page scrollable. This applies to apps that position their elements relative to the bottom of the WebView. This is the default behaviour on Android, and makes a lot of sense when building apps as opposed to webpages.