Skip to main content

View/Component Customization

1. Get Host View​

Provide host View

Interface Prototype

View getGameView()

2. Set click listener for menu button​

Provides a callback for the host menu button click

Interface Prototype

void setOnTJMenuListener(View.OnClickListener listener)

Parameter Description

ParameterData TypeRequiredAttribute Description
listenerView.OnClickListenerNoView click callback

3. Set click listener for the close button​

Provides a callback for the host close button click

Interface Prototype

void setOnTJCloseListener(View.OnClickListener listener)

Parameter Description

ParameterData TypeRequiredAttribute Description
listenerView.OnClickListenerNoView click callback

4. Add Platform UI Layer Subview​

Add the subview to the platform UI layer between the host game rendering layer and the capsule button, which can be called after the host view is created

Interface Prototype

void addViewToPlatformLayer(View child)

Parameter Description

ParameterData TypeRequiredAttribute Description
childandroid.view.ViewYesSubview to be added

5. Remove platform UI layer subviews​

Removes subviews from the platform UI layer, which can be called after the host view is created

Interface Prototype

void removePlatformLayerView(View child)

Parameter Description

ParameterData TypeRequiredAttribute Description
childandroid.view.ViewYesSubview to be removed