Gamebase SDK for Android  1.8.0
Toast Gamebase Platform
GamebaseWebViewConfiguration.Builder Class Reference
Collaboration diagram for GamebaseWebViewConfiguration.Builder:
Collaboration graph

Public Member Functions

GamebaseWebViewConfiguration build ()
 This method creates an instance of GamebaseWebViewConfiguration. More...
 
Builder setStyle (int style)
 This method sets the style of the WebView. More...
 
Builder setScreenOrientation (int orientation)
 This method sets the screen orientation of the webview. More...
 
Builder setBackgroundColor (int backgroundColor)
 This method sets the background color of the webview. More...
 
Builder setNavigationBarColor (int navigationBarColor)
 This method sets the color of the webview's navigation bar. More...
 
Builder setBackButtonVisible (boolean visible)
 This method sets the visibility of the back button of the WebView. More...
 
Builder setNavigationBarHeight (int height)
 This method sets the height of the navigation bar. More...
 
Builder setTitleText (String titleText)
 This method sets the title of the webview. More...
 
Builder setBackButtonImageResource (@DrawableRes int resourceId)
 This method sets the image of the back button. More...
 
Builder setBackButtonImageResource (@NonNull final Context context, @NonNull final String name)
 This method sets the image of the back button. More...
 
Builder setCloseButtonImageResource (@DrawableRes int resourceId)
 This method sets the image of the close button. More...
 
Builder setCloseButtonImageResource (@NonNull final Context context, @NonNull final String name)
 This method sets the image of the close button. More...
 

Member Function Documentation

◆ build()

This method creates an instance of GamebaseWebViewConfiguration.

Returns
an instance of GamebaseWebViewConfiguration

◆ setBackButtonImageResource() [1/2]

Builder setBackButtonImageResource ( @DrawableRes int  resourceId)

This method sets the image of the back button.

Parameters
resourceIdThe identifier of the resource.
Returns
this

◆ setBackButtonImageResource() [2/2]

Builder setBackButtonImageResource ( @NonNull final Context  context,
@NonNull final String  name 
)

This method sets the image of the back button.

Parameters
contextA Context of the application package implementing this class.
nameThe name of the desired resource.
Returns
this

◆ setBackButtonVisible()

Builder setBackButtonVisible ( boolean  visible)

This method sets the visibility of the back button of the WebView.

Parameters
visiblethe visible is visibility of back button
Returns
this

◆ setBackgroundColor()

Builder setBackgroundColor ( int  backgroundColor)

This method sets the background color of the webview.


Only valid in pop-up style.

Parameters
backgroundColorthe color of the background
Returns
this

◆ setCloseButtonImageResource() [1/2]

Builder setCloseButtonImageResource ( @DrawableRes int  resourceId)

This method sets the image of the close button.

Parameters
resourceIdThe identifier of the resource.
Returns
this

◆ setCloseButtonImageResource() [2/2]

Builder setCloseButtonImageResource ( @NonNull final Context  context,
@NonNull final String  name 
)

This method sets the image of the close button.

Parameters
contextA Context of the application package implementing this class.
nameThe name of the desired resource.
Returns
this

◆ setNavigationBarColor()

Builder setNavigationBarColor ( int  navigationBarColor)

This method sets the color of the webview's navigation bar.

Parameters
navigationBarColorthe color of the navigation bar
Returns
this

◆ setNavigationBarHeight()

Builder setNavigationBarHeight ( int  height)

This method sets the height of the navigation bar.

Parameters
heightthe height of navigation bar
Returns
this

◆ setScreenOrientation()

Builder setScreenOrientation ( int  orientation)

This method sets the screen orientation of the webview.

Parameters
orientationAn orientation constant as used in ActivityInfo.screenOrientation.
Returns
this
See also
ScreenOrientation

◆ setStyle()

Builder setStyle ( int  style)

This method sets the style of the WebView.

Parameters
styleThe style value is browser or popup
Returns
this
See also
GamebaseWebViewStyle

◆ setTitleText()

Builder setTitleText ( String  titleText)

This method sets the title of the webview.

Parameters
titleTextthe titleText is title's text of webview
Returns
this