# showWebView

open fun showWebView(@NonNull activity: Activity, @NonNull url: String)

This method to create the webview and display it on screen.

#### Since

Added 1.4.0.

#### Parameters

activity

Current activity.

url

The URL of the resource to load.

open fun showWebView(@NonNull activity: Activity, @NonNull url: String, @NonNull configuration: GamebaseWebViewConfiguration)

This method to create the webview and display it on screen.

Example Usage:

    GamebaseWebViewConfiguration initSettings
            = GamebaseWebViewConfiguration.newBuilder()
                .setTitleText("title")
                .setScreenOrientation(ScreenOrientation.PORTRAIT)
                .setNavigationBarColor(Color.RED)
                .setNavigationBarHeight(40)
                .setBackButtonVisible(true)
                .setBackButtonImageResource(R.id.back_button)
                .setCloseButtonImageResource(R.id.close_button)
                .build();
    GamebaseWebView.showWebView(MainActivity.this, "http://www.gamebase.com", initSettings);

Content copied to clipboard

#### Since

Added 1.5.0.

#### Parameters

activity

Current activity.

url

The URL of the resource to load.

configuration

The init settings of webview.

#### See also

GamebaseWebViewConfiguration

open fun showWebView(@NonNull activity: Activity, @NonNull url: String, @Nullable configuration: GamebaseWebViewConfiguration, onCloseCallback: GamebaseCallback, schemeList: List<String>, onEvent: GamebaseDataCallback<String>)

This method to create the webview and display it on screen.

Example Usage:

    GamebaseWebViewConfiguration initSettings
            = GamebaseWebViewConfiguration.newBuilder()
                .setTitleText("title")
                .setScreenOrientation(ScreenOrientation.PORTRAIT)
                .setNavigationBarColor(Color.RED)
                .setNavigationBarHeight(40)
                .setBackButtonVisible(true)
                .setBackButtonImageResource(R.id.back_button)
                .setCloseButtonImageResource(R.id.close_button)
                .build();

    Gamebase.WebView.showWebView(getActivity(),
        "http://www.gamebase.com",
        initSettings,
        new GamebaseCallback(){
            @Override
            public void onCallback(GamebaseException exception) {
                ...
            }
        },
        schemeList,
        new GamebaseDataCallback<String>() {
            @Override
            public void onCallback(String fullURL, GamebaseException exception) {
                ...
            }
        });

Content copied to clipboard

#### Since

Added 1.4.0.

#### Parameters

activity

Current activity.

url

The URL of the resource to load.

configuration

The initSettings of webview.

onCloseCallback

called when the browser closed.

schemeList

for receiving events.

onEvent

from Scheme list.

#### See also

GamebaseWebViewConfiguration
GamebaseCallback
GamebaseDataCallback