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
| Parameter | Data Type | Required | Attribute Description |
|---|---|---|---|
| listener | View.OnClickListener | No | View 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
| Parameter | Data Type | Required | Attribute Description |
|---|---|---|---|
| listener | View.OnClickListener | No | View 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
| Parameter | Data Type | Required | Attribute Description |
|---|---|---|---|
| child | android.view.View | Yes | Subview 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
| Parameter | Data Type | Required | Attribute Description |
|---|---|---|---|
| child | android.view.View | Yes | Subview to be removed |