BrowserView QML Type

Opens a web browser with navigation. More...

Import Statement: import ArcGIS.AppFramework.WebView 1.0

Properties

Methods

Detailed Description

The BrowserView component provides a visible interface to browse a web page. BrowserView should be used in place of WebView if navigation through multiple pages is a priority. On iOS, BrowserView opens a Safari view, and on Android, a Chrome view; on all other platforms, BrowserView opens a custom AppFramework browser with buttons for navigating forward and back in your page history, opening the current page in your device's default standalone browser, and copying the page URL to the clipboard.

Item {
        Button {
                        text: "Open BrowserView"
                        onClicked: {
                browserView.show()
                        }
        }

        BrowserView {
                id: browserView
        anchors.fill: parent
        url: "https://appstudio.arcgis.com/"
        primaryColor:"#8f499c"
        foregroundColor: "#f7d4f4"
        }
}

To avoid UI scaling issues, the enableHighDpi property in the display section of appinfo.json should be set to true.

Property Documentation

foregroundColor : color

Sets the color of control items such as buttons in the BrowserView panel. If not provided, will return the browser's default.

This property is not supported on Android. Instead, control items are derived from the primaryColor: a dark primaryColor will have black control items, while a light primaryColor will have white control items.


primaryColor : color

Sets the background color for the browser. If not provided, will use the browser's default background color.


url : url

The URL that the browser view will be opened to.


Method Documentation

object show()

on iOS, opens a Safari view controller. On Android, opens a Chrome view controller. On all other platforms, opens a custom AppFramework WebView implementation.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.