Gamebase SDK for Android  2.41.0
NHN Cloud 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 setNavigationBarVisible (boolean visible)
 This method sets the visibility of the navigation bar 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...
 
Builder setPopupCalcRule (final int popupCalcRule)
 This method sets the rule of calculation of popup size. More...
 
Builder setPopupWidthRatio (final float width)
 This method sets the width ratio of the pop-up style web view. More...
 
Builder setPopupHeightRatio (final float height)
 This method sets the height ratio of the pop-up style web view. More...
 
Builder setPopupWidthDp (final int width)
 This method sets the width dp size of the pop-up style web view. More...
 
Builder setPopupHeightDp (final int height)
 This method sets the height dp size of the pop-up style web view. More...
 
Builder enableFixedFontSize (final boolean enable)
 This method fixes the font size. More...
 
Builder enableAutoCloseByCustomScheme (boolean autoCloseByCustomScheme)
 Change whether webview is automatically closed when the custom scheme is activated. More...
 

Static Public Member Functions

static Builder from (@NonNull final GamebaseWebViewConfiguration configuration)
 This method creates an instance of Builder from GamebaseWebViewConfiguration. More...
 

Member Function Documentation

◆ build()

This method creates an instance of GamebaseWebViewConfiguration.

Returns
an instance of GamebaseWebViewConfiguration

◆ enableAutoCloseByCustomScheme()

Builder enableAutoCloseByCustomScheme ( boolean  autoCloseByCustomScheme)

Change whether webview is automatically closed when the custom scheme is activated.

On platforms like Unity, the event doesn't fire while the popup is floating. Therefore, in order to process the event, if a custom click event occurs, all pop-ups must be closed. The default value is true.

Since
Added 2.41.0.
Parameters
autoCloseByCustomSchemeclose webview when custom event execution is required.
Returns
The builder of configuration.

◆ enableFixedFontSize()

Builder enableFixedFontSize ( final boolean  enable)

This method fixes the font size.

Parameters
enablefix font size of not.
Returns
The builder of configuration.

◆ from()

static Builder from ( @NonNull final GamebaseWebViewConfiguration  configuration)
static

This method creates an instance of Builder from GamebaseWebViewConfiguration.

Parameters
configurationWebViewConfiguration
Returns
this
See also
GamebaseWebViewConfiguration
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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

◆ setNavigationBarVisible()

Builder setNavigationBarVisible ( boolean  visible)

This method sets the visibility of the navigation bar of the WebView.

Parameters
visiblethe visible is visibility of navigation bar
Returns
this

◆ setPopupCalcRule()

Builder setPopupCalcRule ( final int  popupCalcRule)

This method sets the rule of calculation of popup size.

See PopupWebViewCalcRule.

Parameters
popupCalcRulefixed aspect ratio enabled.
Returns
The builder of configuration.
See also
PopupWebViewCalcRule#RATIO.
PopupWebViewCalcRule#DP.

◆ setPopupHeightDp()

Builder setPopupHeightDp ( final int  height)

This method sets the height dp size of the pop-up style web view.

If you set a dp value that exceeds the screen maximum size, it will be displayed as the screen maximum value.

Parameters
heightthe height dp size of web view.
Returns
The builder of configuration.

◆ setPopupHeightRatio()

Builder setPopupHeightRatio ( final float  height)

This method sets the height ratio of the pop-up style web view.

The value is a float between 0 and 1, where 0 means 0% and 1 means 100%.

Parameters
heightthe height of web view.
Returns
The builder of configuration.

◆ setPopupWidthDp()

Builder setPopupWidthDp ( final int  width)

This method sets the width dp size of the pop-up style web view.

If you set a dp value that exceeds the screen maximum size, it will be displayed as the screen maximum value.

Parameters
widththe width dp size of web view.
Returns
The builder of configuration.

◆ setPopupWidthRatio()

Builder setPopupWidthRatio ( final float  width)

This method sets the width ratio of the pop-up style web view.

The value is a float between 0 and 1, where 0 means 0% and 1 means 100%.

Parameters
widththe width of web view.
Returns
The builder of configuration.

◆ 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