Gamebase SDK for Android  1.4.3
Toast Gamebase Platform

◆ showWebView() [3/3]

static void showWebView ( @NonNull Activity  activity,
@NonNull String  url,
@NonNull GamebaseWebViewConfiguration  configuration,
GamebaseCallback  onCloseCallback,
List< String >  schemeList,
GamebaseDataCallback< String >  onEvent 
)
static

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

Parameters
activityCurrent activity.
urlThe url of the resource to load.
configurationThe configuration of webview.
onCloseCallbackcalled when the browser closed.
schemeListfor receiving events.
onEventfrom Scheme list.

Example Usage:

GamebaseWebViewConfiguration configuration
= new GamebaseWebViewConfiguration.Builder()
.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",
configuration,
new GamebaseCallback(){
@Override
public void onCallback(GamebaseException exception) {
...
}
},
schemeList,
new GamebaseDataCallback<String>() {
@Override
public void onCallback(String data, GamebaseException exception) {
...
}
});